﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="Stock" targetNamespace="http://tempuri.org/Stock.xsd" xmlns:mstns="http://tempuri.org/Stock.xsd" xmlns="http://tempuri.org/Stock.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="StockQueries" GeneratorFunctionsComponentClassName="StockQueries" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" UserFunctionsComponentName="StockQueries" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="DIAptekaConnectionString" ConnectionStringObject="" IsAppSettingsProperty="True" Modifier="Assembly" Name="DIAptekaConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.DIProject.Properties.Settings.GlobalReference.Default.DIAptekaConnectionString" Provider="System.Data.SqlClient">
          </Connection>
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="ShiftsOutTableAdapter" GeneratorDataComponentClassName="ShiftsOutTableAdapter" Name="ShiftsOut" UserDataComponentName="ShiftsOutTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>ShiftOutDocDelete</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>ShiftOutDocInsert</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@DocDate" Precision="16" ProviderType="SmallDateTime" Scale="0" Size="4" SourceColumn="DocDate" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="InputOutput" ParameterName="@DocNumber" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="DocNumber" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ShiftDepartmentId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="DepartmentId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ParentId" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ParentId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="InputOutput" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="InputOutput" ParameterName="@Id" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT     d.Id, d.ParentId, d.DocDate, d.DocNumber + 'в' AS DocNumber, d.ShiftDepartmentId AS DepartmentId, c.ShortName AS DepartmentName, COUNT(l.Id) 
                      AS Lines, COALESCE (SUM(- l.RetailSum), 0) AS DocSum, d.Note, d.MD, d.MW
FROM         CA.Documents AS d INNER JOIN
                      CO.Departments AS c ON c.Id = d.ShiftDepartmentId LEFT OUTER JOIN
                      CA.GoodsDocLines AS l ON l.DocId = d.Id
WHERE     (d.DocTypeId = 4)
GROUP BY d.Id, d.ParentId, d.DocDate, d.DocNumber, d.ShiftDepartmentId, c.ShortName, d.Note, d.MD, d.MW
ORDER BY d.DocDate, DocNumber</CommandText>
                    <Parameters>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>ShiftOutDocUpdate</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@DocDate" Precision="16" ProviderType="SmallDateTime" Scale="0" Size="4" SourceColumn="DocDate" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@DocNumber" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="DocNumber" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ShiftDepartmentId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="DepartmentId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ParentId" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ParentId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="DocDate" DataSetColumn="DocDate" />
              <Mapping SourceColumn="DocNumber" DataSetColumn="DocNumber" />
              <Mapping SourceColumn="DepartmentId" DataSetColumn="DepartmentId" />
              <Mapping SourceColumn="DepartmentName" DataSetColumn="DepartmentName" />
              <Mapping SourceColumn="Lines" DataSetColumn="Lines" />
              <Mapping SourceColumn="DocSum" DataSetColumn="DocSum" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
              <Mapping SourceColumn="ParentId" DataSetColumn="ParentId" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="ShiftOutLinesTableAdapter" GeneratorDataComponentClassName="ShiftOutLinesTableAdapter" Name="ShiftOutLines" UserDataComponentName="ShiftOutLinesTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="True">
                    <CommandText>ShiftOutLinesDelete</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="True">
                    <CommandText>ShiftOutLinesInsert</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@DocId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="DocId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@PartyId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="PartyId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Qntty" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Qntty" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@RetailSum" Precision="19" ProviderType="Decimal" Scale="2" Size="9" SourceColumn="RetailSum" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>select	Id				= l.Id
	,	DocId			= l.DocId
	,	PartyId			= l.PartyId
	,	Name			= q.FullName
	,	ManufacturerId	= g.ManufacturerId
	,	ManufacturerName= q.ManufacturerName
	,	RetailPrice		= p.RetailPrice
	,	Qntty			= -l.Qntty
	,	RetailSum		= -l.RetailSum
	,	ReturnLineId	= l.ReturnLineId
	,	Note			= l.Note
	,	MD				= l.MD
	,	MW				= l.MW
from	ca.Documents	d	with(nolock)
join	ca.GoodsDocLines l	with(nolock)
	on	l.DocId			= d.Id
join	cd.Parties		p	with(nolock)
	on	p.Id			= l.PartyId
join	vwGoodsDetailed	q
	on	q.Id			= p.GoodsId
join	ca.Goods		g	with(nolock)
	on	g.Id			= p.GoodsId
where	d.Id			= @DocId
	and	d.DocTypeId		= 4
order by q.FullName, q.ManufacturerName
</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="DocId" ColumnName="Id" DataSourceName="DIApteka.CA.Documents" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@DocId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="True">
                    <CommandText>ShiftOutLinesUpdate</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Qntty" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Qntty" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@RetailSum" Precision="19" ProviderType="Decimal" Scale="2" Size="9" SourceColumn="RetailSum" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="DocId" DataSetColumn="DocId" />
              <Mapping SourceColumn="PartyId" DataSetColumn="PartyId" />
              <Mapping SourceColumn="Name" DataSetColumn="Name" />
              <Mapping SourceColumn="ManufacturerId" DataSetColumn="ManufacturerId" />
              <Mapping SourceColumn="ManufacturerName" DataSetColumn="ManufacturerName" />
              <Mapping SourceColumn="RetailPrice" DataSetColumn="RetailPrice" />
              <Mapping SourceColumn="Qntty" DataSetColumn="Qntty" />
              <Mapping SourceColumn="RetailSum" DataSetColumn="RetailSum" />
              <Mapping SourceColumn="ReturnLineId" DataSetColumn="ReturnLineId" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="ShiftsInTableAdapter" GeneratorDataComponentClassName="ShiftsInTableAdapter" Name="ShiftsIn" UserDataComponentName="ShiftsInTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>ShiftInDocDelete</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="True">
                    <CommandText>ShiftInDocInsert</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="InputOutput" ParameterName="@Id" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@DocDate" Precision="16" ProviderType="SmallDateTime" Scale="0" Size="4" SourceColumn="DocDate" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="InputOutput" ParameterName="@DocNumber" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="DocNumber" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ShiftDepartmentId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="DepartmentId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@ContragentDocDate" Precision="16" ProviderType="SmallDateTime" Scale="0" Size="4" SourceColumn="ContragentDocDate" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@ContragentDocNumber" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="ContragentDocNumber" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ParentId" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ParentId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="InputOutput" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>select	Id					= d.Id
	,	ParentId			= d.ParentId
	,	DocDate				= d.DocDate
	,	DocNumber			= d.DocNumber
	,	DepartmentId		= d.ShiftDepartmentId
	,	DepartmentName		= c.ShortName
	,	ContragentDocDate	= d.ContragentDocDate
	,	ContragentDocNumber	= d.ContragentDocNumber
	,	Lines				= count(l.Id)
	,	DocSum				= coalesce(sum(l.RetailSum), 0)
	,	Note				= d.Note
	,	MD					= d.MD
	,	MW					= d.MW
from	ca.Documents		d
join	co.Departments		c
	on	c.Id				= d.ShiftDepartmentId
left join ca.GoodsDocLines	l
	on	l.DocId				= d.Id
where	d.DocTypeId			= 5
group by d.Id, d.ParentId, d.DocDate, d.DocNumber, d.ShiftDepartmentId, c.ShortName, d.ContragentDocDate, d.ContragentDocNumber, d.Note, d.MD, d.MW
order by d.DocDate, d.DocNumber
</CommandText>
                    <Parameters>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="True">
                    <CommandText>ShiftInDocUpdate</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@DocDate" Precision="16" ProviderType="SmallDateTime" Scale="0" Size="4" SourceColumn="DocDate" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@DocNumber" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="DocNumber" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ShiftDepartmentId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="DepartmentId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@ContragentDocDate" Precision="16" ProviderType="SmallDateTime" Scale="0" Size="4" SourceColumn="ContragentDocDate" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@ContragentDocNumber" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="ContragentDocNumber" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ParentId" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ParentId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="DocDate" DataSetColumn="DocDate" />
              <Mapping SourceColumn="DocNumber" DataSetColumn="DocNumber" />
              <Mapping SourceColumn="DepartmentId" DataSetColumn="DepartmentId" />
              <Mapping SourceColumn="DepartmentName" DataSetColumn="DepartmentName" />
              <Mapping SourceColumn="Lines" DataSetColumn="Lines" />
              <Mapping SourceColumn="DocSum" DataSetColumn="DocSum" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
              <Mapping SourceColumn="ContragentDocDate" DataSetColumn="ContragentDocDate" />
              <Mapping SourceColumn="ContragentDocNumber" DataSetColumn="ContragentDocNumber" />
              <Mapping SourceColumn="ParentId" DataSetColumn="ParentId" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="ShiftsOutFreeTableAdapter" GeneratorDataComponentClassName="ShiftsOutFreeTableAdapter" Name="ShiftsOutFree" UserDataComponentName="ShiftsOutFreeTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>select	Id					= d.Id
	,	DocDate				= d.DocDate
	,	DocNumber			= d.DocNumber
	,	DepartmentId		= d.DepartmentId
	,	DepartmentName		= c.ShortName
	,	Lines				= count(l.Id)
	,	DocSum				= coalesce(sum(-l.RetailSum), 0)
	,	Note				= d.Note
	,	MD					= d.MD
	,	MW					= d.MW
from	ca.Documents		d
left join ca.Documents		i	-- приходные внутренние документы
	on	i.DocTypeId			= 4
	and	i.ContragentDocDate	= d.DocDate
	and	i.ContragentDocNumber=d.DocNumber
join	co.Departments		c
	on	c.Id				= d.DepartmentId
left join ca.GoodsDocLines	l
	on	l.DocId				= d.Id
where	d.DocTypeId			= 4
	and	i.Id				is null
group by d.Id, d.DocDate, d.DocNumber, d.DepartmentId, c.ShortName, d.Note, d.MD, d.MW
order by d.DocDate, d.DocNumber
</CommandText>
                    <Parameters>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="DocDate" DataSetColumn="DocDate" />
              <Mapping SourceColumn="DocNumber" DataSetColumn="DocNumber" />
              <Mapping SourceColumn="DepartmentId" DataSetColumn="DepartmentId" />
              <Mapping SourceColumn="DepartmentName" DataSetColumn="DepartmentName" />
              <Mapping SourceColumn="Lines" DataSetColumn="Lines" />
              <Mapping SourceColumn="DocSum" DataSetColumn="DocSum" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="RepricesTableAdapter" GeneratorDataComponentClassName="RepricesTableAdapter" Name="Reprices" UserDataComponentName="RepricesTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="DIApteka.CA.Documents" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="True">
                    <CommandText>RepriceDocDelete</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="True">
                    <CommandText>RepriceDocInsert</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="InputOutput" ParameterName="@Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@DocDate" Precision="16" ProviderType="SmallDateTime" Scale="0" Size="4" SourceColumn="DocDate" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="InputOutput" ParameterName="@DocNumber" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="DocNumber" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="InputOutput" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>select	Id					= d.Id
	,	DocDate				= d.DocDate
	,	DocNumber			= d.DocNumber
	,	Lines				= count(l.Id) / 2
	,	Note				= d.Note
	,	MD					= d.MD
	,	MW					= d.MW
from	ca.Documents		d
left join ca.GoodsDocLines	l
	on	l.DocId				= d.Id
where	d.DocTypeId			= 10
group by d.Id, d.DocDate, d.DocNumber, d.Note, d.MD, d.MW
order by d.DocDate, d.DocNumber
</CommandText>
                    <Parameters>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="True">
                    <CommandText>RepriceDocUpdate</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@DocDate" Precision="16" ProviderType="SmallDateTime" Scale="0" Size="4" SourceColumn="DocDate" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@DocNumber" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="DocNumber" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="DocDate" DataSetColumn="DocDate" />
              <Mapping SourceColumn="DocNumber" DataSetColumn="DocNumber" />
              <Mapping SourceColumn="Lines" DataSetColumn="Lines" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="RepriceLinesTableAdapter" GeneratorDataComponentClassName="RepriceLinesTableAdapter" Name="RepriceLines" UserDataComponentName="RepriceLinesTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>RepriceLinesDelete</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>RepriceLinesInsert</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@DocId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="DocId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@OldPartyId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="OldPartyId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiStringFixedLength" Direction="Input" ParameterName="@NewBarCode" Precision="0" ProviderType="Char" Scale="0" Size="12" SourceColumn="NewBarCode" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@NewRetailPrice" Precision="19" ProviderType="Decimal" Scale="2" Size="9" SourceColumn="NewRetailPrice" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Qntty" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Qntty" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@RepriceWriteoffReasonId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="ReasonId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@RepriceWriteoffReasonText" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="ReasonText" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@QualityLossMark" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="QualityLossMark" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT     w.Id, ol.DocId, ol.Id AS OLId, nl.Id AS NLId, op.Id AS OldPartyId, np.Id AS NewPartyId, v.FullName AS Name, g.ManufacturerId, 
                      v.ManufacturerName AS ManufacturerName, op.RetailPrice AS OldRetailPrice, np.RetailPrice AS NewRetailPrice, nl.Qntty, 
                      w.RepriceWriteoffReasonId AS ReasonId, r.Name AS ReasonName, w.RepriceWriteoffReasonText AS ReasonText, w.QualityLossMark, w.Note, 
                      op.BarCode AS OldBarCode, np.BarCode AS NewBarCode, w.MD, w.MW
FROM         CA.GoodsDocLines AS ol INNER JOIN
                      CA.GoodsDocLines AS nl ON nl.DocId = ol.DocId AND nl.ReturnLineId = ol.Id INNER JOIN
                      CD.RepriceWriteoffLines AS w ON w.GoodsDocLineId = nl.Id INNER JOIN
                      CO.RepriceWriteoffReason AS r ON r.Id = w.RepriceWriteoffReasonId INNER JOIN
                      CD.Parties AS op ON op.Id = ol.PartyId INNER JOIN
                      CD.Parties AS np ON np.Id = nl.PartyId AND np.DocId = nl.DocId INNER JOIN
                      vwGoodsDetailed AS v ON v.Id = op.GoodsId INNER JOIN
                      CA.Goods AS g ON g.Id = op.GoodsId
WHERE     (ol.DocId = @DocId)
ORDER BY Name, ManufacturerName</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="DocId" ColumnName="DocId" DataSourceName="DIApteka.CA.GoodsDocLines" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@DocId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="DocId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>RepriceLinesUpdate</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@DocId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="DocId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@NewRetailPrice" Precision="19" ProviderType="Decimal" Scale="2" Size="9" SourceColumn="NewRetailPrice" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Qntty" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Qntty" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiStringFixedLength" Direction="Input" ParameterName="@NewBarCode" Precision="0" ProviderType="Char" Scale="0" Size="12" SourceColumn="NewBarCode" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@RepriceWriteoffReasonId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="ReasonId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@RepriceWriteoffReasonText" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="ReasonText" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@QualityLossMark" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="QualityLossMark" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="DocId" DataSetColumn="DocId" />
              <Mapping SourceColumn="OLId" DataSetColumn="OLId" />
              <Mapping SourceColumn="NLId" DataSetColumn="NLId" />
              <Mapping SourceColumn="OldPartyId" DataSetColumn="OldPartyId" />
              <Mapping SourceColumn="NewPartyId" DataSetColumn="NewPartyId" />
              <Mapping SourceColumn="Name" DataSetColumn="Name" />
              <Mapping SourceColumn="ManufacturerId" DataSetColumn="ManufacturerId" />
              <Mapping SourceColumn="ManufacturerName" DataSetColumn="ManufacturerName" />
              <Mapping SourceColumn="NewRetailPrice" DataSetColumn="NewRetailPrice" />
              <Mapping SourceColumn="Qntty" DataSetColumn="Qntty" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="NewBarCode" DataSetColumn="NewBarCode" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
              <Mapping SourceColumn="OldRetailPrice" DataSetColumn="OldRetailPrice" />
              <Mapping SourceColumn="OldBarCode" DataSetColumn="OldBarCode" />
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="ReasonId" DataSetColumn="ReasonId" />
              <Mapping SourceColumn="ReasonName" DataSetColumn="ReasonName" />
              <Mapping SourceColumn="ReasonText" DataSetColumn="ReasonText" />
              <Mapping SourceColumn="QualityLossMark" DataSetColumn="QualityLossMark" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="DisgathersTableAdapter" GeneratorDataComponentClassName="DisgathersTableAdapter" Name="Disgathers" UserDataComponentName="DisgathersTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>DisgatherGoodsDelete</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT     d.Id, d.DocDate, d.DocNumber, v.FullName AS GoodsName, v.ManufacturerName, p.BarCode AS Barcode, p.RetailPrice, d.Note, d.MD, d.MW
FROM         CA.Documents AS d INNER JOIN
                      CA.GoodsDocLines AS l ON l.DocId = d.Id AND l.Qntty &lt; 0 INNER JOIN
                      CD.Parties AS p ON p.Id = l.PartyId INNER JOIN
                      vwGoodsDetailed AS v ON v.Id = p.GoodsId
WHERE     (d.DocTypeId = 12)
ORDER BY d.DocDate, d.DocNumber</CommandText>
                    <Parameters>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="DocDate" DataSetColumn="DocDate" />
              <Mapping SourceColumn="DocNumber" DataSetColumn="DocNumber" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
              <Mapping SourceColumn="GoodsName" DataSetColumn="GoodsName" />
              <Mapping SourceColumn="ManufacturerName" DataSetColumn="ManufacturerName" />
              <Mapping SourceColumn="Barcode" DataSetColumn="Barcode" />
              <Mapping SourceColumn="RetailPrice" DataSetColumn="RetailPrice" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="WriteOffsTableAdapter" GeneratorDataComponentClassName="WriteOffsTableAdapter" Name="WriteOffs" UserDataComponentName="WriteOffsTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="DIApteka.CA.Documents" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="True">
                    <CommandText>WriteOffDocDelete</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="True">
                    <CommandText>WriteOffDocInsert</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="InputOutput" ParameterName="@Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@DocDate" Precision="16" ProviderType="SmallDateTime" Scale="0" Size="4" SourceColumn="DocDate" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="InputOutput" ParameterName="@DocNumber" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="DocNumber" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="InputOutput" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>select	Id					= d.Id
	,	DocDate				= d.DocDate
	,	DocNumber			= d.DocNumber
	,	Lines				= count(l.Id)
	,	DocSum				= coalesce(sum(-l.RetailSum), 0)
	,	Note				= d.Note
	,	MD					= d.MD
	,	MW					= d.MW
from	ca.Documents		d
left join ca.GoodsDocLines	l
	on	l.DocId				= d.Id
where	d.DocTypeId			= 9
group by d.Id, d.DocDate, d.DocNumber, d.Note, d.MD, d.MW
order by d.DocDate, d.DocNumber
</CommandText>
                    <Parameters>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="True">
                    <CommandText>WriteOffDocUpdate</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@DocDate" Precision="16" ProviderType="SmallDateTime" Scale="0" Size="4" SourceColumn="DocDate" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@DocNumber" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="DocNumber" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="DocDate" DataSetColumn="DocDate" />
              <Mapping SourceColumn="DocNumber" DataSetColumn="DocNumber" />
              <Mapping SourceColumn="Lines" DataSetColumn="Lines" />
              <Mapping SourceColumn="DocSum" DataSetColumn="DocSum" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="WriteOffLinesTableAdapter" GeneratorDataComponentClassName="WriteOffLinesTableAdapter" Name="WriteOffLines" UserDataComponentName="WriteOffLinesTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>WriteOffLinesDelete</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>WriteOffLinesInsert</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@DocId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="DocId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@PartyId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="PartyId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Qntty" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Qntty" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@RetailSum" Precision="19" ProviderType="Decimal" Scale="2" Size="9" SourceColumn="RetailSum" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@RepriceWriteoffReasonId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="ReasonId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@RepriceWriteoffReasonText" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="ReasonText" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@QualityLossMark" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="QualityLossMark" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT     w.Id, 0 AS GId, w.DocId, l.PartyId, v.FullName AS Name, g.ManufacturerId, v.ManufacturerName, p.BarCode AS Barcode, p.RetailPrice, - l.Qntty AS Qntty,
                       - l.RetailSum AS RetailSum, l.ReturnLineId, w.RepriceWriteoffReasonId AS ReasonId, r.Name AS ReasonName, 
                      w.RepriceWriteoffReasonText AS ReasonText, w.QualityLossMark, w.Note, w.MD, w.MW
FROM         CA.Documents AS d INNER JOIN
                      CA.GoodsDocLines AS l ON l.DocId = d.Id INNER JOIN
                      CD.RepriceWriteoffLines AS w ON w.GoodsDocLineId = l.Id INNER JOIN
                      CO.RepriceWriteoffReason AS r ON r.Id = w.RepriceWriteoffReasonId INNER JOIN
                      CD.Parties AS p ON p.Id = l.PartyId INNER JOIN
                      vwGoodsDetailed AS v ON v.Id = p.GoodsId INNER JOIN
                      CA.Goods AS g ON g.Id = p.GoodsId
WHERE     (d.Id = @DocId) AND (d.DocTypeId = 9)
ORDER BY Name, v.ManufacturerName</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="DocId" ColumnName="Id" DataSourceName="DIOffice.CA.Documents" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@DocId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>WriteOffLinesUpdate</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Qntty" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Qntty" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@RetailSum" Precision="19" ProviderType="Decimal" Scale="2" Size="9" SourceColumn="RetailSum" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@RepriceWriteoffReasonId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="ReasonId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@RepriceWriteoffReasonText" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="ReasonText" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@QualityLossMark" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="QualityLossMark" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="GId" DataSetColumn="GId" />
              <Mapping SourceColumn="DocId" DataSetColumn="DocId" />
              <Mapping SourceColumn="PartyId" DataSetColumn="PartyId" />
              <Mapping SourceColumn="Name" DataSetColumn="Name" />
              <Mapping SourceColumn="ManufacturerId" DataSetColumn="ManufacturerId" />
              <Mapping SourceColumn="ManufacturerName" DataSetColumn="ManufacturerName" />
              <Mapping SourceColumn="Barcode" DataSetColumn="Barcode" />
              <Mapping SourceColumn="RetailPrice" DataSetColumn="RetailPrice" />
              <Mapping SourceColumn="Qntty" DataSetColumn="Qntty" />
              <Mapping SourceColumn="RetailSum" DataSetColumn="RetailSum" />
              <Mapping SourceColumn="ReturnLineId" DataSetColumn="ReturnLineId" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
              <Mapping SourceColumn="ReasonId" DataSetColumn="ReasonId" />
              <Mapping SourceColumn="ReasonName" DataSetColumn="ReasonName" />
              <Mapping SourceColumn="ReasonText" DataSetColumn="ReasonText" />
              <Mapping SourceColumn="QualityLossMark" DataSetColumn="QualityLossMark" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="DisgatherTableAdapter" GeneratorDataComponentClassName="DisgatherTableAdapter" Name="Disgather" UserDataComponentName="DisgatherTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill">
                <InsertCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>DisgatherGoodsInsert</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@SrcPartyId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="PartyId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@DestGoodsId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="GoodsId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@FirstPrice" Precision="19" ProviderType="Decimal" Scale="2" Size="9" SourceColumn="RetailPrice1" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@FirstQntty" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Qntty1" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@SecondPrice" Precision="19" ProviderType="Decimal" Scale="2" Size="9" SourceColumn="RetailPrice2" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@SecondQntty" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Qntty2" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="InputOutput" ParameterName="@DocId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT     d.Id, d.DocDate, d.DocNumber, p0.Id AS PartyId, p1.GoodsId, v0.ManufacturerName, v0.FullName AS GoodsName0, v1.FullName AS GoodsName1, 
                      p0.BarCode AS Barcode0, p0.RetailPrice AS RetailPrice0, - l0.Qntty AS Qntty0, p1.BarCode AS Barcode1, p1.RetailPrice AS RetailPrice1, 
                      l1.Qntty AS Qntty1, p2.BarCode AS Barcode2, p2.RetailPrice AS RetailPrice2, l2.Qntty AS Qntty2, d.Note, d.MD, d.MW
FROM         CA.Documents AS d INNER JOIN
                      CA.GoodsDocLines AS l0 ON l0.DocId = d.Id AND l0.Qntty &lt; 0 INNER JOIN
                      CD.Parties AS p0 ON p0.Id = l0.PartyId INNER JOIN
                      vwGoodsDetailed AS v0 ON v0.Id = p0.GoodsId INNER JOIN
                      CA.GoodsDocLines AS l1 ON l1.DocId = d.Id AND l1.Qntty &gt; 0 INNER JOIN
                      CD.Parties AS p1 ON p1.Id = l1.PartyId AND p1.BarCode = d.ContragentDocNumber INNER JOIN
                      vwGoodsDetailed AS v1 ON v1.Id = p1.GoodsId INNER JOIN
                      CA.GoodsDocLines AS l2 ON l2.DocId = d.Id AND l2.Qntty &gt; 0 LEFT OUTER JOIN
                      CD.Parties AS p2 ON p2.Id = l2.PartyId AND p2.BarCode &lt;&gt; d.ContragentDocNumber
WHERE     (d.Id = @DocId) AND (d.DocTypeId = 12)
ORDER BY d.DocDate, d.DocNumber</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="DocId" ColumnName="Id" DataSourceName="DIApteka.CA.Documents" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@DocId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="DocDate" DataSetColumn="DocDate" />
              <Mapping SourceColumn="DocNumber" DataSetColumn="DocNumber" />
              <Mapping SourceColumn="ManufacturerName" DataSetColumn="ManufacturerName" />
              <Mapping SourceColumn="GoodsName0" DataSetColumn="GoodsName0" />
              <Mapping SourceColumn="GoodsName1" DataSetColumn="GoodsName1" />
              <Mapping SourceColumn="Barcode0" DataSetColumn="Barcode0" />
              <Mapping SourceColumn="RetailPrice0" DataSetColumn="RetailPrice0" />
              <Mapping SourceColumn="Qntty0" DataSetColumn="Qntty0" />
              <Mapping SourceColumn="Barcode1" DataSetColumn="Barcode1" />
              <Mapping SourceColumn="RetailPrice1" DataSetColumn="RetailPrice1" />
              <Mapping SourceColumn="Qntty1" DataSetColumn="Qntty1" />
              <Mapping SourceColumn="Barcode2" DataSetColumn="Barcode2" />
              <Mapping SourceColumn="RetailPrice2" DataSetColumn="RetailPrice2" />
              <Mapping SourceColumn="Qntty2" DataSetColumn="Qntty2" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
              <Mapping SourceColumn="PartyId" DataSetColumn="PartyId" />
              <Mapping SourceColumn="GoodsId" DataSetColumn="GoodsId" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="DisgatheredGoodsTableAdapter" GeneratorDataComponentClassName="DisgatheredGoodsTableAdapter" Name="DisgatheredGoods" UserDataComponentName="DisgatheredGoodsTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="DIOffice.dbo.vwGoodsDetailed" DbObjectType="View" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT     ChildId AS Id, FullName, ManufacturerName, CountryName, RetailPack, AllowUnPack, BeforeOverdue,
                          (SELECT     RetailPack
                            FROM          vwGoodsDetailed AS gd
                            WHERE      (Id = vwGoodsDetailed.ChildId)) AS RetailPackChild
FROM         vwGoodsDetailed
WHERE     (Id = @Id)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="Id" ColumnName="Id" DataSourceName="DIOffice.dbo.vwGoodsDetailed" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Id" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="FullName" DataSetColumn="FullName" />
              <Mapping SourceColumn="ManufacturerName" DataSetColumn="ManufacturerName" />
              <Mapping SourceColumn="CountryName" DataSetColumn="CountryName" />
              <Mapping SourceColumn="RetailPack" DataSetColumn="RetailPack" />
              <Mapping SourceColumn="AllowUnPack" DataSetColumn="AllowUnPack" />
              <Mapping SourceColumn="BeforeOverdue" DataSetColumn="BeforeOverdue" />
              <Mapping SourceColumn="RetailPackChild" DataSetColumn="RetailPackChild" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="ShiftOutUploadTableAdapter" GeneratorDataComponentClassName="ShiftOutUploadTableAdapter" Name="ShiftOutUpload" UserDataComponentName="ShiftOutUploadTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>select	Id						= d.Id
	,	DocDate					= d.DocDate
	,	DocNumber				= d.DocNumber
	,	DepartmentId			= o.DepartmentId
	,	DepartmentName			= p.ShortName
	,	Note					= d.Note
	,	MD						= d.MD
	,	MW						= d.MW
from	pr.DepartmentOptions	o
join	co.Departments			p
	on	p.Id					= o.DepartmentId
join	ca.Documents			d
	on	d.Id					= @DocId
	and	d.DocTypeId				= 4
</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="DocId" ColumnName="Id" DataSourceName="SyncDict.CA.Documents" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@DocId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="DocDate" DataSetColumn="DocDate" />
              <Mapping SourceColumn="DocNumber" DataSetColumn="DocNumber" />
              <Mapping SourceColumn="DepartmentId" DataSetColumn="DepartmentId" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
              <Mapping SourceColumn="DepartmentName" DataSetColumn="DepartmentName" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="ShiftOutLinesUploadTableAdapter" GeneratorDataComponentClassName="ShiftOutLinesUploadTableAdapter" Name="ShiftOutLinesUpload" UserDataComponentName="ShiftOutLinesUploadTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>
                      select	DocId				= @DocId
                      ,	LineId				= l.Id
                      ,	GoodsId				= p.GoodsId
                      ,	BarCode				= p.BarCode
                      ,	DocQntty			= -l.Qntty
                      ,	Qntty				= -l.Qntty
                      ,	SupplierGoodsId		= i.SupplierGoodsId
                      ,	ManufacturerPrice	= i.ManufacturerPrice
                      ,	SupplierPrice		=  dbo.ParentSupplierPriceForChild(i.GoodsId, p.GoodsId, i.SupplierPrice)
                      ,	SupplierSumNOTAX	= i.SupplierSumNOTAX
                      ,	ImportMarkup		= i.ImportMarkup
                      ,	SupplierMarkup		= i.SupplierMarkup
                      ,	BatchNumber			= i.BatchNumber
                      ,	ReadyBefore			= i.ReadyBefore
                      ,	MadeDate			= i.MadeDate
                      ,	NDSTax				= i.NDSTax
                      ,	NDSValue			= i.NDSValue
                      ,	ReestrPrice			= i.ReestrPrice
                      ,	ReestrDate			= i.ReestrDate
                      ,	GTDNumber			= i.GTDNumber
                      ,	CertificateNumber	= i.CertificateNumber
                      ,	CertificateDate		= i.CertificateDate
                      ,	CertificateOrgId	= i.CertificateOrgId
                      ,	RetailMarkup		= i.RetailMarkup
                      ,	RetailPrice			= p.RetailPrice
                      ,	ContragentId		= i.ContragentId
                      ,	ContragentDocDate	= i.ContragentDocDate
                      ,	ContragentDocNumber	= i.ContragentDocNumber
                      ,	Note				= l.Note
                      ,	MD					= l.MD
                      ,	MW					= l.MW
                      from	ca.Documents		d
                      join	ca.GoodsDocLines	l
                      on	l.DocId				= d.Id
                      join	cd.Parties			p
                      on	p.Id				= l.PartyId
                      join	dbo.vwInputLines	i
                      on	i.Id				= p.InputLineId
                      join	ca.Goods			g
                      on	g.Id				= p.GoodsId
                      where	d.Id				= @DocId
                      and	d.DocTypeId			= 4
                    </CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="DocId" ColumnName="Id" DataSourceName="SyncDict.CA.Documents" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@DocId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="DocId" DataSetColumn="DocId" />
              <Mapping SourceColumn="GoodsId" DataSetColumn="GoodsId" />
              <Mapping SourceColumn="BarCode" DataSetColumn="BarCode" />
              <Mapping SourceColumn="DocQntty" DataSetColumn="DocQntty" />
              <Mapping SourceColumn="Qntty" DataSetColumn="Qntty" />
              <Mapping SourceColumn="SupplierGoodsId" DataSetColumn="SupplierGoodsId" />
              <Mapping SourceColumn="ManufacturerPrice" DataSetColumn="ManufacturerPrice" />
              <Mapping SourceColumn="SupplierPrice" DataSetColumn="SupplierPrice" />
              <Mapping SourceColumn="ImportMarkup" DataSetColumn="ImportMarkup" />
              <Mapping SourceColumn="SupplierMarkup" DataSetColumn="SupplierMarkup" />
              <Mapping SourceColumn="BatchNumber" DataSetColumn="BatchNumber" />
              <Mapping SourceColumn="ReadyBefore" DataSetColumn="ReadyBefore" />
              <Mapping SourceColumn="MadeDate" DataSetColumn="MadeDate" />
              <Mapping SourceColumn="NDSTax" DataSetColumn="NDSTax" />
              <Mapping SourceColumn="NDSValue" DataSetColumn="NDSValue" />
              <Mapping SourceColumn="ReestrPrice" DataSetColumn="ReestrPrice" />
              <Mapping SourceColumn="ReestrDate" DataSetColumn="ReestrDate" />
              <Mapping SourceColumn="GTDNumber" DataSetColumn="GTDNumber" />
              <Mapping SourceColumn="CertificateNumber" DataSetColumn="CertificateNumber" />
              <Mapping SourceColumn="CertificateDate" DataSetColumn="CertificateDate" />
              <Mapping SourceColumn="CertificateOrgId" DataSetColumn="CertificateOrgId" />
              <Mapping SourceColumn="RetailMarkup" DataSetColumn="RetailMarkup" />
              <Mapping SourceColumn="RetailPrice" DataSetColumn="RetailPrice" />
              <Mapping SourceColumn="ContragentId" DataSetColumn="ContragentId" />
              <Mapping SourceColumn="ContragentDocDate" DataSetColumn="ContragentDocDate" />
              <Mapping SourceColumn="ContragentDocNumber" DataSetColumn="ContragentDocNumber" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
              <Mapping SourceColumn="LineId" DataSetColumn="LineId" />
              <Mapping SourceColumn="SupplierSumNOTAX" DataSetColumn="SupplierSumNOTAX" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="ShiftInDownloadTableAdapter" GeneratorDataComponentClassName="ShiftInDownloadTableAdapter" Name="ShiftInDownload" UserDataComponentName="ShiftInDownloadTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="SyncDict.CA.Documents" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="True" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <InsertCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="True">
                    <CommandText>ShiftInDocInsert</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="InputOutput" ParameterName="@Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@DocDate" Precision="16" ProviderType="SmallDateTime" Scale="0" Size="4" SourceColumn="DocDate" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="InputOutput" ParameterName="@DocNumber" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="DocNumber" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ShiftDepartmentId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="ContragentId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@ContragentDocDate" Precision="16" ProviderType="SmallDateTime" Scale="0" Size="4" SourceColumn="ContragentDocDate" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@ContragentDocNumber" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="ContragentDocNumber" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ParentId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="ParentId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="InputOutput" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>select	Id					= Id
	,	DocDate				= DocDate
	,	DocNumber			= DocNumber
	,	ContragentId		= ShiftDepartmentId
	,	ContragentDocDate	= ContragentDocDate
	,	ContragentDocNumber	= ContragentDocNumber
	,	ParentId			= ParentId
	,	Note				= Note
	,	MD					= MD
	,	MW					= MW
from	ca.Documents
where	Id					= @DocId
	and	DocTypeId			= 5
</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="DocId" ColumnName="Id" DataSourceName="SyncDict.CA.Documents" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@DocId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="DocDate" DataSetColumn="DocDate" />
              <Mapping SourceColumn="DocNumber" DataSetColumn="DocNumber" />
              <Mapping SourceColumn="ContragentId" DataSetColumn="ContragentId" />
              <Mapping SourceColumn="ContragentDocDate" DataSetColumn="ContragentDocDate" />
              <Mapping SourceColumn="ContragentDocNumber" DataSetColumn="ContragentDocNumber" />
              <Mapping SourceColumn="ParentId" DataSetColumn="ParentId" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="ShiftInLinesDownloadTableAdapter" GeneratorDataComponentClassName="ShiftInLinesDownloadTableAdapter" Name="ShiftInLinesDownload" UserDataComponentName="ShiftInLinesDownloadTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <InsertCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="True">
                    <CommandText>ShiftInLinesInsert</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@DocId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="DocId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@GoodsId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="GoodsId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiStringFixedLength" Direction="Input" ParameterName="@BarCode" Precision="0" ProviderType="Char" Scale="0" Size="12" SourceColumn="BarCode" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@DocQntty" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="DocQntty" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Qntty" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Qntty" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@SupplierGoodsId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="SupplierGoodsId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@ManufacturerPrice" Precision="19" ProviderType="Decimal" Scale="2" Size="9" SourceColumn="ManufacturerPrice" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@SupplierPrice" Precision="19" ProviderType="Decimal" Scale="2" Size="9" SourceColumn="SupplierPrice" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@SupplierSumNOTAX" Precision="0" ProviderType="Decimal" Scale="0" Size="0" SourceColumn="SupplierSumNOTAX" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Double" Direction="Input" ParameterName="@ImportMarkup" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumn="ImportMarkup" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Double" Direction="Input" ParameterName="@SupplierMarkup" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumn="SupplierMarkup" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@BatchNumber" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="BatchNumber" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@ReadyBefore" Precision="16" ProviderType="SmallDateTime" Scale="0" Size="4" SourceColumn="ReadyBefore" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MadeDate" Precision="16" ProviderType="SmallDateTime" Scale="0" Size="4" SourceColumn="MadeDate" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Byte" Direction="Input" ParameterName="@NDSTax" Precision="3" ProviderType="TinyInt" Scale="0" Size="1" SourceColumn="NDSTax" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@NDSValue" Precision="19" ProviderType="Decimal" Scale="2" Size="9" SourceColumn="NDSValue" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@ReestrPrice" Precision="19" ProviderType="Decimal" Scale="2" Size="9" SourceColumn="ReestrPrice" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@ReestrDate" Precision="16" ProviderType="SmallDateTime" Scale="0" Size="4" SourceColumn="ReestrDate" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@GTDNumber" Precision="0" ProviderType="VarChar" Scale="0" Size="30" SourceColumn="GTDNumber" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@CertificateNumber" Precision="0" ProviderType="VarChar" Scale="0" Size="80" SourceColumn="CertificateNumber" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@CertificateDate" Precision="16" ProviderType="SmallDateTime" Scale="0" Size="4" SourceColumn="CertificateDate" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@CertificateOrgId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="CertificateOrgId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Double" Direction="Input" ParameterName="@RetailMarkup" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumn="RetailMarkup" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@RetailPrice" Precision="19" ProviderType="Decimal" Scale="2" Size="9" SourceColumn="RetailPrice" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ContragentId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="ContragentId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@ContragentDocDate" Precision="16" ProviderType="SmallDateTime" Scale="0" Size="4" SourceColumn="ContragentDocDate" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@ContragentDocNumber" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="ContragentDocNumber" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ReturnLineId" Precision="0" ProviderType="Int" Scale="0" Size="12" SourceColumn="ReturnLineId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>select	DocId				= @DocId
	,	GoodsId				= p.GoodsId
	,	BarCode				= p.BarCode
	,	DocQntty			= i.DocQntty
	,	Qntty				= l.Qntty
	,	SupplierGoodsId		= i.SupplierGoodsId
	,	ManufacturerPrice	= i.ManufacturerPrice
	,	SupplierPrice		= i.SupplierPrice
	,	SupplierSumNOTAX	= i.SupplierSumNOTAX
	,	ImportMarkup		= i.ImportMarkup
	,	SupplierMarkup		= i.SupplierMarkup
	,	BatchNumber			= i.BatchNumber
	,	ReadyBefore			= i.ReadyBefore
	,	MadeDate			= i.MadeDate
	,	NDSTax				= i.NDSTax
	,	NDSValue			= i.NDSValue
	,	ReestrPrice			= i.ReestrPrice
	,	ReestrDate			= i.ReestrDate
	,	GTDNumber			= i.GTDNumber
	,	CertificateNumber	= i.CertificateNumber
	,	CertificateDate		= i.CertificateDate
	,	CertificateOrgId	= i.CertificateOrgId
	,	RetailMarkup		= i.RetailMarkup
	,	RetailPrice			= p.RetailPrice
	,	ContragentId		= i.ContragentId
	,	ContragentDocDate	= i.ContragentDocDate
	,	ContragentDocNumber	= i.ContragentDocNumber
	,	ReturnLineId		= i.ReturnLineId
	,	Note				= l.Note
	,	MD					= l.MD
	,	MW					= l.MW
from	ca.Documents		d
join	ca.GoodsDocLines	l
	on	l.DocId				= d.Id
join	cd.Parties			p
	on	p.Id				= l.PartyId
join	dbo.vwInputLines	i
	on	i.Id				= p.InputLineId
join	ca.Goods			g
	on	g.Id				= p.GoodsId
where	d.Id				= @DocId
	and	d.DocTypeId			= 5
</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="DocId" ColumnName="Id" DataSourceName="SyncDict.CA.Documents" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@DocId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="DocId" DataSetColumn="DocId" />
              <Mapping SourceColumn="GoodsId" DataSetColumn="GoodsId" />
              <Mapping SourceColumn="BarCode" DataSetColumn="BarCode" />
              <Mapping SourceColumn="DocQntty" DataSetColumn="DocQntty" />
              <Mapping SourceColumn="Qntty" DataSetColumn="Qntty" />
              <Mapping SourceColumn="SupplierGoodsId" DataSetColumn="SupplierGoodsId" />
              <Mapping SourceColumn="ManufacturerPrice" DataSetColumn="ManufacturerPrice" />
              <Mapping SourceColumn="SupplierPrice" DataSetColumn="SupplierPrice" />
              <Mapping SourceColumn="ImportMarkup" DataSetColumn="ImportMarkup" />
              <Mapping SourceColumn="SupplierMarkup" DataSetColumn="SupplierMarkup" />
              <Mapping SourceColumn="BatchNumber" DataSetColumn="BatchNumber" />
              <Mapping SourceColumn="ReadyBefore" DataSetColumn="ReadyBefore" />
              <Mapping SourceColumn="MadeDate" DataSetColumn="MadeDate" />
              <Mapping SourceColumn="NDSTax" DataSetColumn="NDSTax" />
              <Mapping SourceColumn="NDSValue" DataSetColumn="NDSValue" />
              <Mapping SourceColumn="ReestrPrice" DataSetColumn="ReestrPrice" />
              <Mapping SourceColumn="ReestrDate" DataSetColumn="ReestrDate" />
              <Mapping SourceColumn="GTDNumber" DataSetColumn="GTDNumber" />
              <Mapping SourceColumn="CertificateNumber" DataSetColumn="CertificateNumber" />
              <Mapping SourceColumn="CertificateDate" DataSetColumn="CertificateDate" />
              <Mapping SourceColumn="CertificateOrgId" DataSetColumn="CertificateOrgId" />
              <Mapping SourceColumn="RetailMarkup" DataSetColumn="RetailMarkup" />
              <Mapping SourceColumn="RetailPrice" DataSetColumn="RetailPrice" />
              <Mapping SourceColumn="ContragentId" DataSetColumn="ContragentId" />
              <Mapping SourceColumn="ContragentDocDate" DataSetColumn="ContragentDocDate" />
              <Mapping SourceColumn="ContragentDocNumber" DataSetColumn="ContragentDocNumber" />
              <Mapping SourceColumn="ReturnLineId" DataSetColumn="ReturnLineId" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
              <Mapping SourceColumn="SupplierSumNOTAX" DataSetColumn="SupplierSumNOTAX" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="ShiftInLinesTableAdapter" GeneratorDataComponentClassName="ShiftInLinesTableAdapter" Name="ShiftInLines" UserDataComponentName="ShiftInLinesTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>select	Id					= w.Id
	,	ReturnLineId		= w.ReturnLineId
	,	DocId				= w.DocId
	,	GoodsId				= w.GoodsId
	,	SupplierGoodsId		= w.SupplierGoodsId
	,	PartyId				= w.PartyId
	,	Name				= q.FullName
	,	ManufacturerId		= g.ManufacturerId
	,	ManufacturerName	= q.ManufacturerName

	,	BarCode				= w.BarCode
	,	ManufacturerPrice	= w.ManufacturerPrice
	,	SupplierPrice		= w.SupplierPrice
	,	SupplierSumNOTAX	= w.SupplierSumNOTAX
	,	ImportMarkup		= w.ImportMarkup
	,	SupplierMarkup		= w.SupplierMarkup
	,	BatchNumber			= w.BatchNumber
	,	ReadyBefore			= w.ReadyBefore
	,	MadeDate			= w.MadeDate
	,	NDSTax				= w.NDSTax
	,	NDSValue			= w.NDSValue
	,	ReestrPrice			= w.ReestrPrice
	,	ReestrDate			= w.ReestrDate
	,	GTDNumber			= w.GTDNumber
	,	CertificateNumber	= w.CertificateNumber
	,	CertificateDate		= w.CertificateDate
	,	CertificateOrgId	= w.CertificateOrgId
	,	RetailMarkup		= w.RetailMarkup
	,	ContragentId		= w.ContragentId
	,	ContragentDocDate	= w.ContragentDocDate
	,	ContragentDocNumber	= w.ContragentDocNumber
	,	Blocked				= p.Blocked

	,	RetailPrice			= p.RetailPrice
	,	DocQntty			= w.DocQntty
	,	Qntty				= l.Qntty
	,	RetailSum			= l.RetailSum
	,	Note				= w.Note
	,	MD					= w.MD
	,	MW					= w.MW
from	ca.Documents		d
join	ca.GoodsDocLines	l
	on	l.DocId				= d.Id
join	cd.Parties			p
	on	p.Id				= l.PartyId
join	vwInputLines		w
	on	w.Id				= p.InputLineId
join	vwGoodsDetailed		q
	on	q.Id				= w.GoodsId
join	ca.Goods			g
	on	g.Id				= w.GoodsId
where	d.Id				= @DocId
	and	d.DocTypeId			= 5
order by q.FullName, q.ManufacturerName
</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="DocId" ColumnName="Id" DataSourceName="SyncDict.CA.Documents" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@DocId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="True">
                    <CommandText>ShiftInLinesUpdate</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@GoodsId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="GoodsId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiStringFixedLength" Direction="Input" ParameterName="@BarCode" Precision="0" ProviderType="Char" Scale="0" Size="12" SourceColumn="BarCode" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@DocQntty" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="DocQntty" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Qntty" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Qntty" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@SupplierGoodsId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="SupplierGoodsId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@ManufacturerPrice" Precision="19" ProviderType="Decimal" Scale="2" Size="9" SourceColumn="ManufacturerPrice" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@SupplierPrice" Precision="19" ProviderType="Decimal" Scale="2" Size="9" SourceColumn="SupplierPrice" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@SupplierSumNOTAX" Precision="0" ProviderType="Decimal" Scale="0" Size="0" SourceColumn="SupplierSumNOTAX" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Double" Direction="Input" ParameterName="@ImportMarkup" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumn="ImportMarkup" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Double" Direction="Input" ParameterName="@SupplierMarkup" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumn="SupplierMarkup" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@BatchNumber" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="BatchNumber" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@ReadyBefore" Precision="16" ProviderType="SmallDateTime" Scale="0" Size="4" SourceColumn="ReadyBefore" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MadeDate" Precision="16" ProviderType="SmallDateTime" Scale="0" Size="4" SourceColumn="MadeDate" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Byte" Direction="Input" ParameterName="@NDSTax" Precision="3" ProviderType="TinyInt" Scale="0" Size="1" SourceColumn="NDSTax" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@NDSValue" Precision="19" ProviderType="Decimal" Scale="2" Size="9" SourceColumn="NDSValue" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@ReestrPrice" Precision="19" ProviderType="Decimal" Scale="2" Size="9" SourceColumn="ReestrPrice" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@ReestrDate" Precision="16" ProviderType="SmallDateTime" Scale="0" Size="4" SourceColumn="ReestrDate" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@GTDNumber" Precision="0" ProviderType="VarChar" Scale="0" Size="30" SourceColumn="GTDNumber" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@CertificateNumber" Precision="0" ProviderType="VarChar" Scale="0" Size="80" SourceColumn="CertificateNumber" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@CertificateDate" Precision="16" ProviderType="SmallDateTime" Scale="0" Size="4" SourceColumn="CertificateDate" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@CertificateOrgId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="CertificateOrgId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Double" Direction="Input" ParameterName="@RetailMarkup" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumn="RetailMarkup" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@RetailPrice" Precision="19" ProviderType="Decimal" Scale="2" Size="9" SourceColumn="RetailPrice" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ContragentId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="ContragentId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@ContragentDocDate" Precision="16" ProviderType="SmallDateTime" Scale="0" Size="4" SourceColumn="ContragentDocDate" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@ContragentDocNumber" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="ContragentDocNumber" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ReturnLineId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="ReturnLineId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="DocId" DataSetColumn="DocId" />
              <Mapping SourceColumn="SupplierGoodsId" DataSetColumn="SupplierGoodsId" />
              <Mapping SourceColumn="PartyId" DataSetColumn="PartyId" />
              <Mapping SourceColumn="Name" DataSetColumn="Name" />
              <Mapping SourceColumn="ManufacturerId" DataSetColumn="ManufacturerId" />
              <Mapping SourceColumn="ManufacturerName" DataSetColumn="ManufacturerName" />
              <Mapping SourceColumn="BarCode" DataSetColumn="BarCode" />
              <Mapping SourceColumn="ManufacturerPrice" DataSetColumn="ManufacturerPrice" />
              <Mapping SourceColumn="SupplierPrice" DataSetColumn="SupplierPrice" />
              <Mapping SourceColumn="ImportMarkup" DataSetColumn="ImportMarkup" />
              <Mapping SourceColumn="SupplierMarkup" DataSetColumn="SupplierMarkup" />
              <Mapping SourceColumn="BatchNumber" DataSetColumn="BatchNumber" />
              <Mapping SourceColumn="ReadyBefore" DataSetColumn="ReadyBefore" />
              <Mapping SourceColumn="MadeDate" DataSetColumn="MadeDate" />
              <Mapping SourceColumn="NDSTax" DataSetColumn="NDSTax" />
              <Mapping SourceColumn="NDSValue" DataSetColumn="NDSValue" />
              <Mapping SourceColumn="ReestrPrice" DataSetColumn="ReestrPrice" />
              <Mapping SourceColumn="ReestrDate" DataSetColumn="ReestrDate" />
              <Mapping SourceColumn="GTDNumber" DataSetColumn="GTDNumber" />
              <Mapping SourceColumn="CertificateNumber" DataSetColumn="CertificateNumber" />
              <Mapping SourceColumn="CertificateDate" DataSetColumn="CertificateDate" />
              <Mapping SourceColumn="CertificateOrgId" DataSetColumn="CertificateOrgId" />
              <Mapping SourceColumn="RetailMarkup" DataSetColumn="RetailMarkup" />
              <Mapping SourceColumn="ContragentId" DataSetColumn="ContragentId" />
              <Mapping SourceColumn="ContragentDocDate" DataSetColumn="ContragentDocDate" />
              <Mapping SourceColumn="ContragentDocNumber" DataSetColumn="ContragentDocNumber" />
              <Mapping SourceColumn="RetailPrice" DataSetColumn="RetailPrice" />
              <Mapping SourceColumn="DocQntty" DataSetColumn="DocQntty" />
              <Mapping SourceColumn="Qntty" DataSetColumn="Qntty" />
              <Mapping SourceColumn="RetailSum" DataSetColumn="RetailSum" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
              <Mapping SourceColumn="Blocked" DataSetColumn="Blocked" />
              <Mapping SourceColumn="GoodsId" DataSetColumn="GoodsId" />
              <Mapping SourceColumn="ReturnLineId" DataSetColumn="ReturnLineId" />
              <Mapping SourceColumn="SupplierSumNOTAX" DataSetColumn="SupplierSumNOTAX" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="ShiftInPartiesTableAdapter" GeneratorDataComponentClassName="ShiftInPartiesTableAdapter" Name="ShiftInParties" UserDataComponentName="ShiftInPartiesTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="SyncDict.CD.Parties" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>select	Id					= p.Id
	,	DocId				= p.DocId
	,	GoodsId				= p.GoodsId
	,	RetailPrice			= p.RetailPrice
	,	BarCode				= p.BarCode
	,	InputLineId			= p.InputLineId
	,	Blocked				= p.Blocked
	,	RestQntty			= p.RestQntty
	,	Note				= p.Note
	,	MD					= p.MD
	,	MW					= p.MW
from	ca.Documents		d
join	ca.GoodsDocLines	l
	on	l.DocId				= d.Id
join	cd.Parties			p
	on	p.Id				= l.PartyId
where	d.Id				= @DocId
	and	d.DocTypeId			= 5
</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="DocId" ColumnName="Id" DataSourceName="SyncDict.CA.Documents" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@DocId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="True">
                    <CommandText>PartiesUpdate</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@RetailPrice" Precision="19" ProviderType="Decimal" Scale="2" Size="9" SourceColumn="RetailPrice" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiStringFixedLength" Direction="Input" ParameterName="@BarCode" Precision="0" ProviderType="Char" Scale="0" Size="12" SourceColumn="BarCode" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Blocked" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="Blocked" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="DocId" DataSetColumn="DocId" />
              <Mapping SourceColumn="GoodsId" DataSetColumn="GoodsId" />
              <Mapping SourceColumn="RetailPrice" DataSetColumn="RetailPrice" />
              <Mapping SourceColumn="BarCode" DataSetColumn="BarCode" />
              <Mapping SourceColumn="InputLineId" DataSetColumn="InputLineId" />
              <Mapping SourceColumn="Blocked" DataSetColumn="Blocked" />
              <Mapping SourceColumn="RestQntty" DataSetColumn="RestQntty" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="ShiftOutByIncomeTableAdapter" GeneratorDataComponentClassName="ShiftOutByIncomeTableAdapter" Name="ShiftOutByIncome" UserDataComponentName="ShiftOutByIncomeTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT        d.Id, d.ContragentId, c.ShortName AS ContragentName, d.DocDate, d.DocNumber, COUNT(l.Id) AS Lines, COALESCE (SUM(l.RetailSum), 0) AS DocSum, d.Note, 
                         d.MD, d.MW, r.Id AS RID, d.ContragentDocNumber
FROM            CA.Documents AS d INNER JOIN
                         CA.Contragents AS c ON c.Id = d.ContragentId LEFT OUTER JOIN
                         CA.Documents AS r ON r.DocTypeId = 4 AND r.ParentId = d.Id LEFT OUTER JOIN
                         CA.GoodsDocLines AS l ON l.DocId = d.Id
WHERE        (d.DocTypeId = 2) OR
                         (d.DocTypeId = 5)
GROUP BY d.Id, d.ContragentId, c.ShortName, d.DocDate, d.DocNumber, d.Note, d.MD, d.MW, r.Id, d.ContragentDocNumber
ORDER BY ContragentName, d.DocDate, d.DocNumber</CommandText>
                    <Parameters>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="ContragentId" DataSetColumn="ContragentId" />
              <Mapping SourceColumn="ContragentName" DataSetColumn="ContragentName" />
              <Mapping SourceColumn="DocDate" DataSetColumn="DocDate" />
              <Mapping SourceColumn="DocNumber" DataSetColumn="DocNumber" />
              <Mapping SourceColumn="Lines" DataSetColumn="Lines" />
              <Mapping SourceColumn="DocSum" DataSetColumn="DocSum" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
              <Mapping SourceColumn="RID" DataSetColumn="RID" />
              <Mapping SourceColumn="ContragentDocNumber" DataSetColumn="ContragentDocNumber" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="ShiftOutLinesByIncomeTableAdapter" GeneratorDataComponentClassName="ShiftOutLinesByIncomeTableAdapter" Name="ShiftOutLinesByIncome" UserDataComponentName="ShiftOutLinesByIncomeTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="SyncDict.dbo.vwInputLines" DbObjectType="View" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>select	PartyId				= i.PartyId
	,	Qntty				= i.Qntty
	,	RetailSum			= i.RetailSum
	,	RestQntty			= p.RestQntty
	,	RestSum				= p.RestQntty*p.RetailPrice
from	dbo.vwInputLines	i
join	cd.Parties			p
	on	p.InputLineId		= i.Id
where	i.DocId				= @DocId
</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="DocId" ColumnName="DocId" DataSourceName="SyncDict.dbo.vwInputLines" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@DocId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="DocId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="PartyId" DataSetColumn="PartyId" />
              <Mapping SourceColumn="Qntty" DataSetColumn="Qntty" />
              <Mapping SourceColumn="RetailSum" DataSetColumn="RetailSum" />
              <Mapping SourceColumn="RestQntty" DataSetColumn="RestQntty" />
              <Mapping SourceColumn="RestSum" DataSetColumn="RestSum" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
        </Tables>
        <Sources>
          <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="DIApteka.dbo.DisgatherGoodsInsert" DbObjectType="StoredProcedure" GenerateShortCommands="True" GeneratorSourceName="DisgatherGoodsInsert" MethodsParameterType="CLR" Modifier="Public" Name="DisgatherGoodsInsert" QueryType="Scalar" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetDataBy" UserSourceName="DisgatherGoodsInsert">
            <SelectCommand>
              <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                <CommandText>dbo.DisgatherGoodsInsert</CommandText>
                <Parameters>
                  <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                  </Parameter>
                  <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@SrcPartyId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                  </Parameter>
                  <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@DestGoodsId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                  </Parameter>
                  <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@FirstPrice" Precision="19" ProviderType="Decimal" Scale="2" Size="9" SourceColumnNullMapping="False" SourceVersion="Current">
                  </Parameter>
                  <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@FirstQntty" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                  </Parameter>
                  <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@SecondPrice" Precision="19" ProviderType="Decimal" Scale="2" Size="9" SourceColumnNullMapping="False" SourceVersion="Current">
                  </Parameter>
                  <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@SecondQntty" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                  </Parameter>
                  <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumnNullMapping="False" SourceVersion="Current">
                  </Parameter>
                  <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumnNullMapping="False" SourceVersion="Current">
                  </Parameter>
                  <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="InputOutput" ParameterName="@DocId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                  </Parameter>
                </Parameters>
              </DbCommand>
            </SelectCommand>
          </DbSource>
          <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="DilanOstankino.CA.Documents" DbObjectType="Table" GenerateShortCommands="True" GeneratorSourceName="ContragentDocNumberFromId" MethodsParameterType="CLR" Modifier="Public" Name="ContragentDocNumberFromId" QueryType="Scalar" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetDataBy1" UserSourceName="ContragentDocNumberFromId">
            <SelectCommand>
              <DbCommand CommandType="Text" ModifiedByUser="True">
                <CommandText>WITH data(id, pid, ContragentDocNumber) AS (SELECT     Id, ParentId, ContragentDocNumber
                                                                                                   FROM          CA.Documents AS d1
                                                                                                   WHERE      (Id = @Id)
                                                                                                   UNION ALL
                                                                                                   SELECT     d2.Id, d2.ParentId, d2.ContragentDocNumber
                                                                                                   FROM         CA.Documents AS d2 INNER JOIN
                                                                                                                         data AS da1 ON d2.Id = da1.pid)
    SELECT     TOP (1) ContragentDocNumber
     FROM         data AS dd
     WHERE     (pid IS NULL)</CommandText>
                <Parameters>
                  <Parameter AllowDbNull="False" AutogeneratedName="Id" ColumnName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Id" Precision="0" Scale="0" Size="4" SourceColumn="" SourceColumnNullMapping="False" SourceVersion="Current">
                  </Parameter>
                </Parameters>
              </DbCommand>
            </SelectCommand>
          </DbSource>
        </Sources>
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="Stock" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:Generator_UserDSName="Stock" msprop:Generator_DataSetName="Stock">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="ShiftsOut" msprop:Generator_UserTableName="ShiftsOut" msprop:Generator_RowDeletedName="ShiftsOutRowDeleted" msprop:Generator_RowChangedName="ShiftsOutRowChanged" msprop:Generator_RowClassName="ShiftsOutRow" msprop:Generator_RowChangingName="ShiftsOutRowChanging" msprop:Generator_RowEvArgName="ShiftsOutRowChangeEvent" msprop:Generator_RowEvHandlerName="ShiftsOutRowChangeEventHandler" msprop:Generator_TableClassName="ShiftsOutDataTable" msprop:Generator_TableVarName="tableShiftsOut" msprop:Generator_RowDeletingName="ShiftsOutRowDeleting" msprop:Generator_TablePropName="ShiftsOut">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="ParentId" msprop:Generator_UserColumnName="ParentId" msprop:Generator_ColumnVarNameInTable="columnParentId" msprop:Generator_ColumnPropNameInRow="ParentId" msprop:Generator_ColumnPropNameInTable="ParentIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="DocDate" msprop:Generator_UserColumnName="DocDate" msprop:Generator_ColumnPropNameInRow="DocDate" msprop:Generator_ColumnVarNameInTable="columnDocDate" msprop:Generator_ColumnPropNameInTable="DocDateColumn" type="xs:dateTime" />
              <xs:element name="DocNumber" msprop:Generator_UserColumnName="DocNumber" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnDocNumber" msprop:Generator_ColumnPropNameInTable="DocNumberColumn" msprop:Generator_ColumnPropNameInRow="DocNumber" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="DepartmentId" msprop:Generator_UserColumnName="DepartmentId" msprop:Generator_ColumnPropNameInRow="DepartmentId" msprop:Generator_ColumnVarNameInTable="columnDepartmentId" msprop:Generator_ColumnPropNameInTable="DepartmentIdColumn" type="xs:int" default="0" minOccurs="0" />
              <xs:element name="DepartmentName" msprop:Generator_UserColumnName="DepartmentName" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnDepartmentName" msprop:Generator_ColumnPropNameInTable="DepartmentNameColumn" msprop:Generator_ColumnPropNameInRow="DepartmentName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Lines" msprop:Generator_UserColumnName="Lines" msprop:Generator_ColumnPropNameInRow="Lines" msprop:Generator_ColumnVarNameInTable="columnLines" msprop:Generator_ColumnPropNameInTable="LinesColumn" type="xs:int" default="0" minOccurs="0" />
              <xs:element name="DocSum" msprop:Generator_UserColumnName="DocSum" msprop:Generator_ColumnPropNameInRow="DocSum" msprop:Generator_ColumnVarNameInTable="columnDocSum" msprop:Generator_ColumnPropNameInTable="DocSumColumn" type="xs:decimal" default="0" minOccurs="0" />
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnNote" msprop:Generator_ColumnPropNameInTable="NoteColumn" msprop:Generator_ColumnPropNameInRow="Note" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:Generator_ColumnPropNameInRow="MW" msprop:Generator_ColumnVarNameInTable="columnMW" msprop:Generator_ColumnPropNameInTable="MWColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="ShiftOutLines" msprop:Generator_UserTableName="ShiftOutLines" msprop:Generator_RowDeletedName="ShiftOutLinesRowDeleted" msprop:Generator_RowChangedName="ShiftOutLinesRowChanged" msprop:Generator_RowClassName="ShiftOutLinesRow" msprop:Generator_RowChangingName="ShiftOutLinesRowChanging" msprop:Generator_RowEvArgName="ShiftOutLinesRowChangeEvent" msprop:Generator_RowEvHandlerName="ShiftOutLinesRowChangeEventHandler" msprop:Generator_TableClassName="ShiftOutLinesDataTable" msprop:Generator_TableVarName="tableShiftOutLines" msprop:Generator_RowDeletingName="ShiftOutLinesRowDeleting" msprop:Generator_TablePropName="ShiftOutLines">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="2147483647" msdata:AutoIncrementStep="-1" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="DocId" msprop:Generator_UserColumnName="DocId" msprop:Generator_ColumnPropNameInRow="DocId" msprop:Generator_ColumnVarNameInTable="columnDocId" msprop:Generator_ColumnPropNameInTable="DocIdColumn" type="xs:int" />
              <xs:element name="PartyId" msprop:Generator_UserColumnName="PartyId" msprop:Generator_ColumnPropNameInRow="PartyId" msprop:Generator_ColumnVarNameInTable="columnPartyId" msprop:Generator_ColumnPropNameInTable="PartyIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInTable="NameColumn" msprop:Generator_ColumnPropNameInRow="Name" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="150" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ManufacturerId" msprop:Generator_UserColumnName="ManufacturerId" msprop:Generator_ColumnPropNameInRow="ManufacturerId" msprop:Generator_ColumnVarNameInTable="columnManufacturerId" msprop:Generator_ColumnPropNameInTable="ManufacturerIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="ManufacturerName" msprop:Generator_UserColumnName="ManufacturerName" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnManufacturerName" msprop:Generator_ColumnPropNameInTable="ManufacturerNameColumn" msprop:Generator_ColumnPropNameInRow="ManufacturerName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="RetailPrice" msprop:Generator_UserColumnName="RetailPrice" msprop:Generator_ColumnPropNameInRow="RetailPrice" msprop:Generator_ColumnVarNameInTable="columnRetailPrice" msprop:Generator_ColumnPropNameInTable="RetailPriceColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="Qntty" msprop:Generator_UserColumnName="Qntty" msprop:Generator_ColumnPropNameInRow="Qntty" msprop:Generator_ColumnVarNameInTable="columnQntty" msprop:Generator_ColumnPropNameInTable="QnttyColumn" type="xs:int" minOccurs="0" />
              <xs:element name="RetailSum" msprop:Generator_UserColumnName="RetailSum" msprop:Generator_ColumnPropNameInRow="RetailSum" msprop:Generator_ColumnVarNameInTable="columnRetailSum" msprop:Generator_ColumnPropNameInTable="RetailSumColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="ReturnLineId" msprop:Generator_UserColumnName="ReturnLineId" msprop:Generator_ColumnPropNameInRow="ReturnLineId" msprop:Generator_ColumnVarNameInTable="columnReturnLineId" msprop:Generator_ColumnPropNameInTable="ReturnLineIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnNote" msprop:Generator_ColumnPropNameInTable="NoteColumn" msprop:Generator_ColumnPropNameInRow="Note" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnMW" msprop:Generator_ColumnPropNameInTable="MWColumn" msprop:Generator_ColumnPropNameInRow="MW">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="ShiftsIn" msprop:Generator_UserTableName="ShiftsIn" msprop:Generator_RowDeletedName="ShiftsInRowDeleted" msprop:Generator_RowChangedName="ShiftsInRowChanged" msprop:Generator_RowClassName="ShiftsInRow" msprop:Generator_RowChangingName="ShiftsInRowChanging" msprop:Generator_RowEvArgName="ShiftsInRowChangeEvent" msprop:Generator_RowEvHandlerName="ShiftsInRowChangeEventHandler" msprop:Generator_TableClassName="ShiftsInDataTable" msprop:Generator_TableVarName="tableShiftsIn" msprop:Generator_RowDeletingName="ShiftsInRowDeleting" msprop:Generator_TablePropName="ShiftsIn">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="ParentId" msprop:Generator_UserColumnName="ParentId" msprop:Generator_ColumnPropNameInRow="ParentId" msprop:Generator_ColumnVarNameInTable="columnParentId" msprop:Generator_ColumnPropNameInTable="ParentIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="DocDate" msprop:Generator_UserColumnName="DocDate" msprop:Generator_ColumnPropNameInRow="DocDate" msprop:Generator_ColumnVarNameInTable="columnDocDate" msprop:Generator_ColumnPropNameInTable="DocDateColumn" type="xs:dateTime" />
              <xs:element name="DocNumber" msprop:Generator_UserColumnName="DocNumber" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnDocNumber" msprop:Generator_ColumnPropNameInTable="DocNumberColumn" msprop:Generator_ColumnPropNameInRow="DocNumber" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="DepartmentId" msprop:Generator_UserColumnName="DepartmentId" msprop:Generator_ColumnPropNameInRow="DepartmentId" msprop:Generator_ColumnVarNameInTable="columnDepartmentId" msprop:Generator_ColumnPropNameInTable="DepartmentIdColumn" type="xs:int" default="0" minOccurs="0" />
              <xs:element name="DepartmentName" msprop:Generator_UserColumnName="DepartmentName" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnDepartmentName" msprop:Generator_ColumnPropNameInTable="DepartmentNameColumn" msprop:Generator_ColumnPropNameInRow="DepartmentName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Lines" msprop:Generator_UserColumnName="Lines" msprop:Generator_ColumnPropNameInRow="Lines" msprop:Generator_ColumnVarNameInTable="columnLines" msprop:Generator_ColumnPropNameInTable="LinesColumn" type="xs:int" minOccurs="0" />
              <xs:element name="DocSum" msprop:Generator_UserColumnName="DocSum" msprop:Generator_ColumnPropNameInRow="DocSum" msprop:Generator_ColumnVarNameInTable="columnDocSum" msprop:Generator_ColumnPropNameInTable="DocSumColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnNote" msprop:Generator_ColumnPropNameInTable="NoteColumn" msprop:Generator_ColumnPropNameInRow="Note" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:Generator_ColumnPropNameInRow="MW" msprop:Generator_ColumnVarNameInTable="columnMW" msprop:Generator_ColumnPropNameInTable="MWColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ContragentDocDate" msprop:Generator_UserColumnName="ContragentDocDate" msprop:Generator_ColumnVarNameInTable="columnContragentDocDate" msprop:Generator_ColumnPropNameInRow="ContragentDocDate" msprop:Generator_ColumnPropNameInTable="ContragentDocDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="ContragentDocNumber" msprop:Generator_UserColumnName="ContragentDocNumber" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="ContragentDocNumber" msprop:Generator_ColumnPropNameInTable="ContragentDocNumberColumn" msprop:Generator_ColumnVarNameInTable="columnContragentDocNumber" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ContragentDocDateStr" msdata:ReadOnly="true" msdata:Expression="iif(isNull(ContragentDocDate, #01/01/0001#) = #01/01/0001#, '', convert(ContragentDocDate, 'System.String'))" msprop:Generator_UserColumnName="ContragentDocDateStr" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnContragentDocDateStr" msprop:Generator_ColumnPropNameInTable="ContragentDocDateStrColumn" msprop:Generator_ColumnPropNameInRow="ContragentDocDateStr" type="xs:string" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="ShiftsOutFree" msprop:Generator_UserTableName="ShiftsOutFree" msprop:Generator_RowDeletedName="ShiftsOutFreeRowDeleted" msprop:Generator_RowChangedName="ShiftsOutFreeRowChanged" msprop:Generator_RowClassName="ShiftsOutFreeRow" msprop:Generator_RowChangingName="ShiftsOutFreeRowChanging" msprop:Generator_RowEvArgName="ShiftsOutFreeRowChangeEvent" msprop:Generator_RowEvHandlerName="ShiftsOutFreeRowChangeEventHandler" msprop:Generator_TableClassName="ShiftsOutFreeDataTable" msprop:Generator_TableVarName="tableShiftsOutFree" msprop:Generator_RowDeletingName="ShiftsOutFreeRowDeleting" msprop:Generator_TablePropName="ShiftsOutFree">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="DocDate" msprop:Generator_UserColumnName="DocDate" msprop:Generator_ColumnPropNameInRow="DocDate" msprop:Generator_ColumnVarNameInTable="columnDocDate" msprop:Generator_ColumnPropNameInTable="DocDateColumn" type="xs:dateTime" />
              <xs:element name="DocNumber" msprop:Generator_UserColumnName="DocNumber" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnDocNumber" msprop:Generator_ColumnPropNameInTable="DocNumberColumn" msprop:Generator_ColumnPropNameInRow="DocNumber">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="DepartmentId" msprop:Generator_UserColumnName="DepartmentId" msprop:Generator_ColumnPropNameInRow="DepartmentId" msprop:Generator_ColumnVarNameInTable="columnDepartmentId" msprop:Generator_ColumnPropNameInTable="DepartmentIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="DepartmentName" msprop:Generator_UserColumnName="DepartmentName" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnDepartmentName" msprop:Generator_ColumnPropNameInTable="DepartmentNameColumn" msprop:Generator_ColumnPropNameInRow="DepartmentName">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Lines" msdata:ReadOnly="true" msprop:Generator_UserColumnName="Lines" msprop:Generator_ColumnPropNameInRow="Lines" msprop:Generator_ColumnVarNameInTable="columnLines" msprop:Generator_ColumnPropNameInTable="LinesColumn" type="xs:int" minOccurs="0" />
              <xs:element name="DocSum" msdata:ReadOnly="true" msprop:Generator_UserColumnName="DocSum" msprop:Generator_ColumnPropNameInRow="DocSum" msprop:Generator_ColumnVarNameInTable="columnDocSum" msprop:Generator_ColumnPropNameInTable="DocSumColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnNote" msprop:Generator_ColumnPropNameInTable="NoteColumn" msprop:Generator_ColumnPropNameInRow="Note" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:Generator_ColumnPropNameInRow="MW" msprop:Generator_ColumnVarNameInTable="columnMW" msprop:Generator_ColumnPropNameInTable="MWColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Reprices" msprop:Generator_UserTableName="Reprices" msprop:Generator_RowDeletedName="RepricesRowDeleted" msprop:Generator_RowChangedName="RepricesRowChanged" msprop:Generator_RowClassName="RepricesRow" msprop:Generator_RowChangingName="RepricesRowChanging" msprop:Generator_RowEvArgName="RepricesRowChangeEvent" msprop:Generator_RowEvHandlerName="RepricesRowChangeEventHandler" msprop:Generator_TableClassName="RepricesDataTable" msprop:Generator_TableVarName="tableReprices" msprop:Generator_RowDeletingName="RepricesRowDeleting" msprop:Generator_TablePropName="Reprices">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="DocDate" msprop:Generator_UserColumnName="DocDate" msprop:Generator_ColumnPropNameInRow="DocDate" msprop:Generator_ColumnVarNameInTable="columnDocDate" msprop:Generator_ColumnPropNameInTable="DocDateColumn" type="xs:dateTime" />
              <xs:element name="DocNumber" msprop:Generator_UserColumnName="DocNumber" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnDocNumber" msprop:Generator_ColumnPropNameInTable="DocNumberColumn" msprop:Generator_ColumnPropNameInRow="DocNumber" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Lines" msprop:Generator_UserColumnName="Lines" msprop:Generator_ColumnPropNameInRow="Lines" msprop:Generator_ColumnVarNameInTable="columnLines" msprop:Generator_ColumnPropNameInTable="LinesColumn" type="xs:int" default="0" minOccurs="0" />
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="Note" msprop:Generator_ColumnPropNameInTable="NoteColumn" msprop:Generator_ColumnVarNameInTable="columnNote" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:Generator_ColumnPropNameInRow="MW" msprop:Generator_ColumnVarNameInTable="columnMW" msprop:Generator_ColumnPropNameInTable="MWColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="RepriceLines" msprop:Generator_UserTableName="RepriceLines" msprop:Generator_RowDeletedName="RepriceLinesRowDeleted" msprop:Generator_RowChangedName="RepriceLinesRowChanged" msprop:Generator_RowClassName="RepriceLinesRow" msprop:Generator_RowChangingName="RepriceLinesRowChanging" msprop:Generator_RowEvArgName="RepriceLinesRowChangeEvent" msprop:Generator_RowEvHandlerName="RepriceLinesRowChangeEventHandler" msprop:Generator_TableClassName="RepriceLinesDataTable" msprop:Generator_TableVarName="tableRepriceLines" msprop:Generator_RowDeletingName="RepriceLinesRowDeleting" msprop:Generator_TablePropName="RepriceLines">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="DocId" msprop:Generator_UserColumnName="DocId" msprop:Generator_ColumnVarNameInTable="columnDocId" msprop:Generator_ColumnPropNameInRow="DocId" msprop:Generator_ColumnPropNameInTable="DocIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="OLId" msprop:Generator_UserColumnName="OLId" msprop:Generator_ColumnVarNameInTable="columnOLId" msprop:Generator_ColumnPropNameInRow="OLId" msprop:Generator_ColumnPropNameInTable="OLIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="NLId" msprop:Generator_UserColumnName="NLId" msprop:Generator_ColumnVarNameInTable="columnNLId" msprop:Generator_ColumnPropNameInRow="NLId" msprop:Generator_ColumnPropNameInTable="NLIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="OldPartyId" msprop:Generator_UserColumnName="OldPartyId" msprop:Generator_ColumnVarNameInTable="columnOldPartyId" msprop:Generator_ColumnPropNameInRow="OldPartyId" msprop:Generator_ColumnPropNameInTable="OldPartyIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="NewPartyId" msprop:Generator_UserColumnName="NewPartyId" msprop:Generator_ColumnVarNameInTable="columnNewPartyId" msprop:Generator_ColumnPropNameInRow="NewPartyId" msprop:Generator_ColumnPropNameInTable="NewPartyIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnPropNameInTable="NameColumn" msprop:Generator_ColumnVarNameInTable="columnName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="150" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ManufacturerId" msprop:Generator_UserColumnName="ManufacturerId" msprop:Generator_ColumnVarNameInTable="columnManufacturerId" msprop:Generator_ColumnPropNameInRow="ManufacturerId" msprop:Generator_ColumnPropNameInTable="ManufacturerIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="ManufacturerName" msprop:Generator_UserColumnName="ManufacturerName" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="ManufacturerName" msprop:Generator_ColumnPropNameInTable="ManufacturerNameColumn" msprop:Generator_ColumnVarNameInTable="columnManufacturerName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="NewRetailPrice" msprop:Generator_UserColumnName="NewRetailPrice" msprop:Generator_ColumnVarNameInTable="columnNewRetailPrice" msprop:Generator_ColumnPropNameInRow="NewRetailPrice" msprop:Generator_ColumnPropNameInTable="NewRetailPriceColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="Qntty" msprop:Generator_UserColumnName="Qntty" msprop:Generator_ColumnVarNameInTable="columnQntty" msprop:Generator_ColumnPropNameInRow="Qntty" msprop:Generator_ColumnPropNameInTable="QnttyColumn" type="xs:int" minOccurs="0" />
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="Note" msprop:Generator_ColumnPropNameInTable="NoteColumn" msprop:Generator_ColumnVarNameInTable="columnNote" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="NewBarCode" msprop:Generator_UserColumnName="NewBarCode" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="NewBarCode" msprop:Generator_ColumnPropNameInTable="NewBarCodeColumn" msprop:Generator_ColumnVarNameInTable="columnNewBarCode" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="12" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="MW" msprop:Generator_ColumnPropNameInTable="MWColumn" msprop:Generator_ColumnVarNameInTable="columnMW" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="OldRetailPrice" msprop:Generator_UserColumnName="OldRetailPrice" msprop:Generator_ColumnPropNameInRow="OldRetailPrice" msprop:Generator_ColumnVarNameInTable="columnOldRetailPrice" msprop:Generator_ColumnPropNameInTable="OldRetailPriceColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="OldBarCode" msprop:Generator_UserColumnName="OldBarCode" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnOldBarCode" msprop:Generator_ColumnPropNameInTable="OldBarCodeColumn" msprop:Generator_ColumnPropNameInRow="OldBarCode" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="12" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="ReasonId" msprop:Generator_UserColumnName="ReasonId" msprop:Generator_ColumnVarNameInTable="columnReasonId" msprop:Generator_ColumnPropNameInRow="ReasonId" msprop:Generator_ColumnPropNameInTable="ReasonIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="ReasonName" msprop:Generator_UserColumnName="ReasonName" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnReasonName" msprop:Generator_ColumnPropNameInTable="ReasonNameColumn" msprop:Generator_ColumnPropNameInRow="ReasonName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ReasonText" msprop:Generator_UserColumnName="ReasonText" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="ReasonText" msprop:Generator_ColumnPropNameInTable="ReasonTextColumn" msprop:Generator_ColumnVarNameInTable="columnReasonText" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="QualityLossMark" msprop:Generator_UserColumnName="QualityLossMark" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="QualityLossMark" msprop:Generator_ColumnPropNameInTable="QualityLossMarkColumn" msprop:Generator_ColumnVarNameInTable="columnQualityLossMark" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Disgathers" msprop:Generator_UserTableName="Disgathers" msprop:Generator_RowDeletedName="DisgathersRowDeleted" msprop:Generator_RowChangedName="DisgathersRowChanged" msprop:Generator_RowClassName="DisgathersRow" msprop:Generator_RowChangingName="DisgathersRowChanging" msprop:Generator_RowEvArgName="DisgathersRowChangeEvent" msprop:Generator_RowEvHandlerName="DisgathersRowChangeEventHandler" msprop:Generator_TableClassName="DisgathersDataTable" msprop:Generator_TableVarName="tableDisgathers" msprop:Generator_RowDeletingName="DisgathersRowDeleting" msprop:Generator_TablePropName="Disgathers">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="DocDate" msprop:Generator_UserColumnName="DocDate" msprop:Generator_ColumnPropNameInRow="DocDate" msprop:Generator_ColumnVarNameInTable="columnDocDate" msprop:Generator_ColumnPropNameInTable="DocDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="DocNumber" msprop:Generator_UserColumnName="DocNumber" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnDocNumber" msprop:Generator_ColumnPropNameInTable="DocNumberColumn" msprop:Generator_ColumnPropNameInRow="DocNumber" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="Note" msprop:Generator_ColumnPropNameInTable="NoteColumn" msprop:Generator_ColumnVarNameInTable="columnNote" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="MW" msprop:Generator_ColumnPropNameInTable="MWColumn" msprop:Generator_ColumnVarNameInTable="columnMW" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="GoodsName" msprop:Generator_UserColumnName="GoodsName" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnGoodsName" msprop:Generator_ColumnPropNameInTable="GoodsNameColumn" msprop:Generator_ColumnPropNameInRow="GoodsName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="213" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ManufacturerName" msprop:Generator_UserColumnName="ManufacturerName" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnManufacturerName" msprop:Generator_ColumnPropNameInTable="ManufacturerNameColumn" msprop:Generator_ColumnPropNameInRow="ManufacturerName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Barcode" msprop:Generator_UserColumnName="Barcode" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnBarcode" msprop:Generator_ColumnPropNameInTable="BarcodeColumn" msprop:Generator_ColumnPropNameInRow="Barcode" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="12" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="RetailPrice" msprop:Generator_UserColumnName="RetailPrice" msprop:Generator_ColumnPropNameInRow="RetailPrice" msprop:Generator_ColumnVarNameInTable="columnRetailPrice" msprop:Generator_ColumnPropNameInTable="RetailPriceColumn" type="xs:decimal" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="WriteOffs" msprop:Generator_UserTableName="WriteOffs" msprop:Generator_RowDeletedName="WriteOffsRowDeleted" msprop:Generator_RowChangedName="WriteOffsRowChanged" msprop:Generator_RowClassName="WriteOffsRow" msprop:Generator_RowChangingName="WriteOffsRowChanging" msprop:Generator_RowEvArgName="WriteOffsRowChangeEvent" msprop:Generator_RowEvHandlerName="WriteOffsRowChangeEventHandler" msprop:Generator_TableClassName="WriteOffsDataTable" msprop:Generator_TableVarName="tableWriteOffs" msprop:Generator_RowDeletingName="WriteOffsRowDeleting" msprop:Generator_TablePropName="WriteOffs">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="DocDate" msprop:Generator_UserColumnName="DocDate" msprop:Generator_ColumnVarNameInTable="columnDocDate" msprop:Generator_ColumnPropNameInRow="DocDate" msprop:Generator_ColumnPropNameInTable="DocDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="DocNumber" msprop:Generator_UserColumnName="DocNumber" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="DocNumber" msprop:Generator_ColumnPropNameInTable="DocNumberColumn" msprop:Generator_ColumnVarNameInTable="columnDocNumber" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Lines" msprop:Generator_UserColumnName="Lines" msprop:Generator_ColumnVarNameInTable="columnLines" msprop:Generator_ColumnPropNameInRow="Lines" msprop:Generator_ColumnPropNameInTable="LinesColumn" type="xs:int" default="0" minOccurs="0" />
              <xs:element name="DocSum" msprop:Generator_UserColumnName="DocSum" msprop:Generator_ColumnVarNameInTable="columnDocSum" msprop:Generator_ColumnPropNameInRow="DocSum" msprop:Generator_ColumnPropNameInTable="DocSumColumn" type="xs:decimal" default="0" minOccurs="0" />
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="Note" msprop:Generator_ColumnPropNameInTable="NoteColumn" msprop:Generator_ColumnVarNameInTable="columnNote" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:Generator_ColumnVarNameInTable="columnMW" msprop:Generator_ColumnPropNameInRow="MW" msprop:Generator_ColumnPropNameInTable="MWColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="WriteOffLines" msprop:Generator_UserTableName="WriteOffLines" msprop:Generator_RowDeletedName="WriteOffLinesRowDeleted" msprop:Generator_RowChangedName="WriteOffLinesRowChanged" msprop:Generator_RowClassName="WriteOffLinesRow" msprop:Generator_RowChangingName="WriteOffLinesRowChanging" msprop:Generator_RowEvArgName="WriteOffLinesRowChangeEvent" msprop:Generator_RowEvHandlerName="WriteOffLinesRowChangeEventHandler" msprop:Generator_TableClassName="WriteOffLinesDataTable" msprop:Generator_TableVarName="tableWriteOffLines" msprop:Generator_RowDeletingName="WriteOffLinesRowDeleting" msprop:Generator_TablePropName="WriteOffLines">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="GId" msprop:Generator_UserColumnName="GId" msprop:Generator_ColumnVarNameInTable="columnGId" msprop:Generator_ColumnPropNameInRow="GId" msprop:Generator_ColumnPropNameInTable="GIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="DocId" msprop:Generator_UserColumnName="DocId" msprop:Generator_ColumnVarNameInTable="columnDocId" msprop:Generator_ColumnPropNameInRow="DocId" msprop:Generator_ColumnPropNameInTable="DocIdColumn" type="xs:int" />
              <xs:element name="PartyId" msprop:Generator_UserColumnName="PartyId" msprop:Generator_ColumnVarNameInTable="columnPartyId" msprop:Generator_ColumnPropNameInRow="PartyId" msprop:Generator_ColumnPropNameInTable="PartyIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInTable="NameColumn" msprop:Generator_ColumnPropNameInRow="Name" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="150" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ManufacturerId" msprop:Generator_UserColumnName="ManufacturerId" msprop:Generator_ColumnVarNameInTable="columnManufacturerId" msprop:Generator_ColumnPropNameInRow="ManufacturerId" msprop:Generator_ColumnPropNameInTable="ManufacturerIdColumn" type="xs:int" />
              <xs:element name="ManufacturerName" msprop:Generator_UserColumnName="ManufacturerName" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnManufacturerName" msprop:Generator_ColumnPropNameInTable="ManufacturerNameColumn" msprop:Generator_ColumnPropNameInRow="ManufacturerName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Barcode" msprop:Generator_UserColumnName="Barcode" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="Barcode" msprop:Generator_ColumnPropNameInTable="BarcodeColumn" msprop:Generator_ColumnVarNameInTable="columnBarcode" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="12" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="RetailPrice" msprop:Generator_UserColumnName="RetailPrice" msprop:Generator_ColumnVarNameInTable="columnRetailPrice" msprop:Generator_ColumnPropNameInRow="RetailPrice" msprop:Generator_ColumnPropNameInTable="RetailPriceColumn" type="xs:decimal" />
              <xs:element name="Qntty" msprop:Generator_UserColumnName="Qntty" msprop:Generator_ColumnVarNameInTable="columnQntty" msprop:Generator_ColumnPropNameInRow="Qntty" msprop:Generator_ColumnPropNameInTable="QnttyColumn" type="xs:int" minOccurs="0" />
              <xs:element name="RetailSum" msprop:Generator_UserColumnName="RetailSum" msprop:Generator_ColumnVarNameInTable="columnRetailSum" msprop:Generator_ColumnPropNameInRow="RetailSum" msprop:Generator_ColumnPropNameInTable="RetailSumColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="ReturnLineId" msprop:Generator_UserColumnName="ReturnLineId" msprop:Generator_ColumnVarNameInTable="columnReturnLineId" msprop:Generator_ColumnPropNameInRow="ReturnLineId" msprop:Generator_ColumnPropNameInTable="ReturnLineIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="Note" msprop:Generator_ColumnPropNameInTable="NoteColumn" msprop:Generator_ColumnVarNameInTable="columnNote" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:Generator_ColumnVarNameInTable="columnMW" msprop:Generator_ColumnPropNameInRow="MW" msprop:Generator_ColumnPropNameInTable="MWColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ReasonId" msprop:Generator_UserColumnName="ReasonId" msprop:Generator_ColumnVarNameInTable="columnReasonId" msprop:Generator_ColumnPropNameInRow="ReasonId" msprop:Generator_ColumnPropNameInTable="ReasonIdColumn" type="xs:int" />
              <xs:element name="ReasonName" msprop:Generator_UserColumnName="ReasonName" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="ReasonName" msprop:Generator_ColumnPropNameInTable="ReasonNameColumn" msprop:Generator_ColumnVarNameInTable="columnReasonName">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ReasonText" msprop:Generator_UserColumnName="ReasonText" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="ReasonText" msprop:Generator_ColumnPropNameInTable="ReasonTextColumn" msprop:Generator_ColumnVarNameInTable="columnReasonText" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="QualityLossMark" msprop:Generator_UserColumnName="QualityLossMark" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="QualityLossMark" msprop:Generator_ColumnPropNameInTable="QualityLossMarkColumn" msprop:Generator_ColumnVarNameInTable="columnQualityLossMark" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Disgather" msprop:Generator_UserTableName="Disgather" msprop:Generator_RowDeletedName="DisgatherRowDeleted" msprop:Generator_RowChangedName="DisgatherRowChanged" msprop:Generator_RowClassName="DisgatherRow" msprop:Generator_RowChangingName="DisgatherRowChanging" msprop:Generator_RowEvArgName="DisgatherRowChangeEvent" msprop:Generator_RowEvHandlerName="DisgatherRowChangeEventHandler" msprop:Generator_TableClassName="DisgatherDataTable" msprop:Generator_TableVarName="tableDisgather" msprop:Generator_RowDeletingName="DisgatherRowDeleting" msprop:Generator_TablePropName="Disgather">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="DocDate" msprop:Generator_UserColumnName="DocDate" msprop:Generator_ColumnPropNameInRow="DocDate" msprop:Generator_ColumnVarNameInTable="columnDocDate" msprop:Generator_ColumnPropNameInTable="DocDateColumn" type="xs:dateTime" />
              <xs:element name="DocNumber" msprop:Generator_UserColumnName="DocNumber" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnDocNumber" msprop:Generator_ColumnPropNameInTable="DocNumberColumn" msprop:Generator_ColumnPropNameInRow="DocNumber">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ManufacturerName" msprop:Generator_UserColumnName="ManufacturerName" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnManufacturerName" msprop:Generator_ColumnPropNameInTable="ManufacturerNameColumn" msprop:Generator_ColumnPropNameInRow="ManufacturerName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="GoodsName0" msprop:Generator_UserColumnName="GoodsName0" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnGoodsName0" msprop:Generator_ColumnPropNameInTable="GoodsName0Column" msprop:Generator_ColumnPropNameInRow="GoodsName0" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="213" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="GoodsName1" msprop:Generator_UserColumnName="GoodsName1" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnGoodsName1" msprop:Generator_ColumnPropNameInTable="GoodsName1Column" msprop:Generator_ColumnPropNameInRow="GoodsName1" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="213" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Barcode0" msprop:Generator_UserColumnName="Barcode0" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnBarcode0" msprop:Generator_ColumnPropNameInTable="Barcode0Column" msprop:Generator_ColumnPropNameInRow="Barcode0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="12" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="RetailPrice0" msprop:Generator_UserColumnName="RetailPrice0" msprop:Generator_ColumnPropNameInRow="RetailPrice0" msprop:Generator_ColumnVarNameInTable="columnRetailPrice0" msprop:Generator_ColumnPropNameInTable="RetailPrice0Column" type="xs:decimal" default="0" />
              <xs:element name="Qntty0" msprop:Generator_UserColumnName="Qntty0" msprop:Generator_ColumnPropNameInRow="Qntty0" msprop:Generator_ColumnVarNameInTable="columnQntty0" msprop:Generator_ColumnPropNameInTable="Qntty0Column" type="xs:int" default="1" minOccurs="0" />
              <xs:element name="Barcode1" msprop:Generator_UserColumnName="Barcode1" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnBarcode1" msprop:Generator_ColumnPropNameInTable="Barcode1Column" msprop:Generator_ColumnPropNameInRow="Barcode1" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="12" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="RetailPrice1" msprop:Generator_UserColumnName="RetailPrice1" msprop:Generator_ColumnPropNameInRow="RetailPrice1" msprop:Generator_ColumnVarNameInTable="columnRetailPrice1" msprop:Generator_ColumnPropNameInTable="RetailPrice1Column" type="xs:decimal" default="0" minOccurs="0" />
              <xs:element name="Qntty1" msprop:Generator_UserColumnName="Qntty1" msprop:Generator_ColumnPropNameInRow="Qntty1" msprop:Generator_ColumnVarNameInTable="columnQntty1" msprop:Generator_ColumnPropNameInTable="Qntty1Column" type="xs:int" default="0" minOccurs="0" />
              <xs:element name="Barcode2" msprop:Generator_UserColumnName="Barcode2" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnBarcode2" msprop:Generator_ColumnPropNameInTable="Barcode2Column" msprop:Generator_ColumnPropNameInRow="Barcode2" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="12" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="RetailPrice2" msprop:Generator_UserColumnName="RetailPrice2" msprop:Generator_ColumnPropNameInRow="RetailPrice2" msprop:Generator_ColumnVarNameInTable="columnRetailPrice2" msprop:Generator_ColumnPropNameInTable="RetailPrice2Column" type="xs:decimal" default="0" minOccurs="0" />
              <xs:element name="Qntty2" msprop:Generator_UserColumnName="Qntty2" msprop:Generator_ColumnPropNameInRow="Qntty2" msprop:Generator_ColumnVarNameInTable="columnQntty2" msprop:Generator_ColumnPropNameInTable="Qntty2Column" type="xs:int" default="0" minOccurs="0" />
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnNote" msprop:Generator_ColumnPropNameInTable="NoteColumn" msprop:Generator_ColumnPropNameInRow="Note" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnMW" msprop:Generator_ColumnPropNameInTable="MWColumn" msprop:Generator_ColumnPropNameInRow="MW">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="PartyId" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="PartyId" msprop:Generator_ColumnPropNameInRow="PartyId" msprop:Generator_ColumnVarNameInTable="columnPartyId" msprop:Generator_ColumnPropNameInTable="PartyIdColumn" type="xs:int" />
              <xs:element name="GoodsId" msprop:Generator_UserColumnName="GoodsId" msprop:Generator_ColumnPropNameInRow="GoodsId" msprop:Generator_ColumnVarNameInTable="columnGoodsId" msprop:Generator_ColumnPropNameInTable="GoodsIdColumn" type="xs:int" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="DisgatheredGoods" msprop:Generator_UserTableName="DisgatheredGoods" msprop:Generator_RowDeletedName="DisgatheredGoodsRowDeleted" msprop:Generator_RowChangedName="DisgatheredGoodsRowChanged" msprop:Generator_RowClassName="DisgatheredGoodsRow" msprop:Generator_RowChangingName="DisgatheredGoodsRowChanging" msprop:Generator_RowEvArgName="DisgatheredGoodsRowChangeEvent" msprop:Generator_RowEvHandlerName="DisgatheredGoodsRowChangeEventHandler" msprop:Generator_TableClassName="DisgatheredGoodsDataTable" msprop:Generator_TableVarName="tableDisgatheredGoods" msprop:Generator_RowDeletingName="DisgatheredGoodsRowDeleting" msprop:Generator_TablePropName="DisgatheredGoods">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="FullName" msdata:ReadOnly="true" msprop:Generator_UserColumnName="FullName" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnFullName" msprop:Generator_ColumnPropNameInTable="FullNameColumn" msprop:Generator_ColumnPropNameInRow="FullName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="213" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ManufacturerName" msprop:Generator_UserColumnName="ManufacturerName" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnManufacturerName" msprop:Generator_ColumnPropNameInTable="ManufacturerNameColumn" msprop:Generator_ColumnPropNameInRow="ManufacturerName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="CountryName" msprop:Generator_UserColumnName="CountryName" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnCountryName" msprop:Generator_ColumnPropNameInTable="CountryNameColumn" msprop:Generator_ColumnPropNameInRow="CountryName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="RetailPack" msprop:Generator_UserColumnName="RetailPack" msprop:Generator_ColumnVarNameInTable="columnRetailPack" msprop:Generator_ColumnPropNameInRow="RetailPack" msprop:Generator_ColumnPropNameInTable="RetailPackColumn" type="xs:int" />
              <xs:element name="AllowUnPack" msprop:Generator_UserColumnName="AllowUnPack" msprop:Generator_ColumnVarNameInTable="columnAllowUnPack" msprop:Generator_ColumnPropNameInRow="AllowUnPack" msprop:Generator_ColumnPropNameInTable="AllowUnPackColumn" type="xs:boolean" />
              <xs:element name="BeforeOverdue" msprop:Generator_UserColumnName="BeforeOverdue" msprop:Generator_ColumnVarNameInTable="columnBeforeOverdue" msprop:Generator_ColumnPropNameInRow="BeforeOverdue" msprop:Generator_ColumnPropNameInTable="BeforeOverdueColumn" type="xs:unsignedByte" minOccurs="0" />
              <xs:element name="RetailPackChild" msdata:ReadOnly="true" msprop:Generator_UserColumnName="RetailPackChild" msprop:Generator_ColumnVarNameInTable="columnRetailPackChild" msprop:Generator_ColumnPropNameInRow="RetailPackChild" msprop:Generator_ColumnPropNameInTable="RetailPackChildColumn" type="xs:int" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="ShiftOutUpload" msprop:Generator_UserTableName="ShiftOutUpload" msprop:Generator_RowDeletedName="ShiftOutUploadRowDeleted" msprop:Generator_RowChangedName="ShiftOutUploadRowChanged" msprop:Generator_RowClassName="ShiftOutUploadRow" msprop:Generator_RowChangingName="ShiftOutUploadRowChanging" msprop:Generator_RowEvArgName="ShiftOutUploadRowChangeEvent" msprop:Generator_RowEvHandlerName="ShiftOutUploadRowChangeEventHandler" msprop:Generator_TableClassName="ShiftOutUploadDataTable" msprop:Generator_TableVarName="tableShiftOutUpload" msprop:Generator_RowDeletingName="ShiftOutUploadRowDeleting" msprop:Generator_TablePropName="ShiftOutUpload">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="DocDate" msprop:Generator_UserColumnName="DocDate" msprop:Generator_ColumnVarNameInTable="columnDocDate" msprop:Generator_ColumnPropNameInRow="DocDate" msprop:Generator_ColumnPropNameInTable="DocDateColumn" type="xs:dateTime" />
              <xs:element name="DocNumber" msprop:Generator_UserColumnName="DocNumber" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnDocNumber" msprop:Generator_ColumnPropNameInTable="DocNumberColumn" msprop:Generator_ColumnPropNameInRow="DocNumber">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="DepartmentId" msprop:Generator_UserColumnName="DepartmentId" msprop:Generator_ColumnVarNameInTable="columnDepartmentId" msprop:Generator_ColumnPropNameInRow="DepartmentId" msprop:Generator_ColumnPropNameInTable="DepartmentIdColumn" type="xs:int" />
              <xs:element name="DepartmentName" msprop:Generator_UserColumnName="DepartmentName" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnDepartmentName" msprop:Generator_ColumnPropNameInTable="DepartmentNameColumn" msprop:Generator_ColumnPropNameInRow="DepartmentName" type="xs:string" minOccurs="0" />
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnNote" msprop:Generator_ColumnPropNameInTable="NoteColumn" msprop:Generator_ColumnPropNameInRow="Note" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnMW" msprop:Generator_ColumnPropNameInTable="MWColumn" msprop:Generator_ColumnPropNameInRow="MW">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="ShiftOutLinesUpload" msprop:Generator_UserTableName="ShiftOutLinesUpload" msprop:Generator_RowDeletedName="ShiftOutLinesUploadRowDeleted" msprop:Generator_RowChangedName="ShiftOutLinesUploadRowChanged" msprop:Generator_RowClassName="ShiftOutLinesUploadRow" msprop:Generator_RowChangingName="ShiftOutLinesUploadRowChanging" msprop:Generator_RowEvArgName="ShiftOutLinesUploadRowChangeEvent" msprop:Generator_RowEvHandlerName="ShiftOutLinesUploadRowChangeEventHandler" msprop:Generator_TableClassName="ShiftOutLinesUploadDataTable" msprop:Generator_TableVarName="tableShiftOutLinesUpload" msprop:Generator_RowDeletingName="ShiftOutLinesUploadRowDeleting" msprop:Generator_TablePropName="ShiftOutLinesUpload">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="DocId" msdata:ReadOnly="true" msprop:Generator_UserColumnName="DocId" msprop:Generator_ColumnPropNameInRow="DocId" msprop:Generator_ColumnVarNameInTable="columnDocId" msprop:Generator_ColumnPropNameInTable="DocIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="LineId" msprop:Generator_UserColumnName="LineId" msprop:Generator_ColumnPropNameInRow="LineId" msprop:Generator_ColumnVarNameInTable="columnLineId" msprop:Generator_ColumnPropNameInTable="LineIdColumn" type="xs:int" />
              <xs:element name="GoodsId" msprop:Generator_UserColumnName="GoodsId" msprop:Generator_ColumnPropNameInRow="GoodsId" msprop:Generator_ColumnVarNameInTable="columnGoodsId" msprop:Generator_ColumnPropNameInTable="GoodsIdColumn" type="xs:int" />
              <xs:element name="BarCode" msprop:Generator_UserColumnName="BarCode" msprop:Generator_ColumnPropNameInRow="BarCode" msprop:Generator_ColumnVarNameInTable="columnBarCode" msprop:Generator_ColumnPropNameInTable="BarCodeColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="12" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="DocQntty" msdata:ReadOnly="true" msprop:Generator_UserColumnName="DocQntty" msprop:Generator_ColumnPropNameInRow="DocQntty" msprop:Generator_ColumnVarNameInTable="columnDocQntty" msprop:Generator_ColumnPropNameInTable="DocQnttyColumn" type="xs:int" minOccurs="0" />
              <xs:element name="Qntty" msdata:ReadOnly="true" msprop:Generator_UserColumnName="Qntty" msprop:Generator_ColumnPropNameInRow="Qntty" msprop:Generator_ColumnVarNameInTable="columnQntty" msprop:Generator_ColumnPropNameInTable="QnttyColumn" type="xs:int" minOccurs="0" />
              <xs:element name="SupplierGoodsId" msprop:Generator_UserColumnName="SupplierGoodsId" msprop:Generator_ColumnPropNameInRow="SupplierGoodsId" msprop:Generator_ColumnVarNameInTable="columnSupplierGoodsId" msprop:Generator_ColumnPropNameInTable="SupplierGoodsIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="ManufacturerPrice" msprop:Generator_UserColumnName="ManufacturerPrice" msprop:Generator_ColumnPropNameInRow="ManufacturerPrice" msprop:Generator_ColumnVarNameInTable="columnManufacturerPrice" msprop:Generator_ColumnPropNameInTable="ManufacturerPriceColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="SupplierPrice" msprop:Generator_UserColumnName="SupplierPrice" msprop:Generator_ColumnPropNameInRow="SupplierPrice" msprop:Generator_ColumnVarNameInTable="columnSupplierPrice" msprop:Generator_ColumnPropNameInTable="SupplierPriceColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="SupplierSumNOTAX" msprop:Generator_UserColumnName="SupplierSumNOTAX" msprop:Generator_ColumnVarNameInTable="columnSupplierSumNOTAX" msprop:Generator_ColumnPropNameInRow="SupplierSumNOTAX" msprop:Generator_ColumnPropNameInTable="SupplierSumNOTAXColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="ImportMarkup" msprop:Generator_UserColumnName="ImportMarkup" msprop:Generator_ColumnPropNameInRow="ImportMarkup" msprop:Generator_ColumnVarNameInTable="columnImportMarkup" msprop:Generator_ColumnPropNameInTable="ImportMarkupColumn" type="xs:double" minOccurs="0" />
              <xs:element name="SupplierMarkup" msprop:Generator_UserColumnName="SupplierMarkup" msprop:Generator_ColumnPropNameInRow="SupplierMarkup" msprop:Generator_ColumnVarNameInTable="columnSupplierMarkup" msprop:Generator_ColumnPropNameInTable="SupplierMarkupColumn" type="xs:double" minOccurs="0" />
              <xs:element name="BatchNumber" msprop:Generator_UserColumnName="BatchNumber" msprop:Generator_ColumnPropNameInRow="BatchNumber" msprop:Generator_ColumnVarNameInTable="columnBatchNumber" msprop:Generator_ColumnPropNameInTable="BatchNumberColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ReadyBefore" msprop:Generator_UserColumnName="ReadyBefore" msprop:Generator_ColumnPropNameInRow="ReadyBefore" msprop:Generator_ColumnVarNameInTable="columnReadyBefore" msprop:Generator_ColumnPropNameInTable="ReadyBeforeColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="MadeDate" msprop:Generator_UserColumnName="MadeDate" msprop:Generator_ColumnPropNameInRow="MadeDate" msprop:Generator_ColumnVarNameInTable="columnMadeDate" msprop:Generator_ColumnPropNameInTable="MadeDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="NDSTax" msprop:Generator_UserColumnName="NDSTax" msprop:Generator_ColumnPropNameInRow="NDSTax" msprop:Generator_ColumnVarNameInTable="columnNDSTax" msprop:Generator_ColumnPropNameInTable="NDSTaxColumn" type="xs:unsignedByte" minOccurs="0" />
              <xs:element name="NDSValue" msprop:Generator_UserColumnName="NDSValue" msprop:Generator_ColumnPropNameInRow="NDSValue" msprop:Generator_ColumnVarNameInTable="columnNDSValue" msprop:Generator_ColumnPropNameInTable="NDSValueColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="ReestrPrice" msprop:Generator_UserColumnName="ReestrPrice" msprop:Generator_ColumnPropNameInRow="ReestrPrice" msprop:Generator_ColumnVarNameInTable="columnReestrPrice" msprop:Generator_ColumnPropNameInTable="ReestrPriceColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="ReestrDate" msprop:Generator_UserColumnName="ReestrDate" msprop:Generator_ColumnPropNameInRow="ReestrDate" msprop:Generator_ColumnVarNameInTable="columnReestrDate" msprop:Generator_ColumnPropNameInTable="ReestrDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="GTDNumber" msprop:Generator_UserColumnName="GTDNumber" msprop:Generator_ColumnPropNameInRow="GTDNumber" msprop:Generator_ColumnVarNameInTable="columnGTDNumber" msprop:Generator_ColumnPropNameInTable="GTDNumberColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="30" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="CertificateNumber" msprop:Generator_UserColumnName="CertificateNumber" msprop:Generator_ColumnPropNameInRow="CertificateNumber" msprop:Generator_ColumnVarNameInTable="columnCertificateNumber" msprop:Generator_ColumnPropNameInTable="CertificateNumberColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="80" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="CertificateDate" msprop:Generator_UserColumnName="CertificateDate" msprop:Generator_ColumnPropNameInRow="CertificateDate" msprop:Generator_ColumnVarNameInTable="columnCertificateDate" msprop:Generator_ColumnPropNameInTable="CertificateDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="CertificateOrgId" msprop:Generator_UserColumnName="CertificateOrgId" msprop:Generator_ColumnPropNameInRow="CertificateOrgId" msprop:Generator_ColumnVarNameInTable="columnCertificateOrgId" msprop:Generator_ColumnPropNameInTable="CertificateOrgIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="RetailMarkup" msprop:Generator_UserColumnName="RetailMarkup" msprop:Generator_ColumnPropNameInRow="RetailMarkup" msprop:Generator_ColumnVarNameInTable="columnRetailMarkup" msprop:Generator_ColumnPropNameInTable="RetailMarkupColumn" type="xs:double" minOccurs="0" />
              <xs:element name="RetailPrice" msprop:Generator_UserColumnName="RetailPrice" msprop:Generator_ColumnPropNameInRow="RetailPrice" msprop:Generator_ColumnVarNameInTable="columnRetailPrice" msprop:Generator_ColumnPropNameInTable="RetailPriceColumn" type="xs:decimal" />
              <xs:element name="ContragentId" msprop:Generator_UserColumnName="ContragentId" msprop:Generator_ColumnPropNameInRow="ContragentId" msprop:Generator_ColumnVarNameInTable="columnContragentId" msprop:Generator_ColumnPropNameInTable="ContragentIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="ContragentDocDate" msprop:Generator_UserColumnName="ContragentDocDate" msprop:Generator_ColumnPropNameInRow="ContragentDocDate" msprop:Generator_ColumnVarNameInTable="columnContragentDocDate" msprop:Generator_ColumnPropNameInTable="ContragentDocDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="ContragentDocNumber" msprop:Generator_UserColumnName="ContragentDocNumber" msprop:Generator_ColumnPropNameInRow="ContragentDocNumber" msprop:Generator_ColumnVarNameInTable="columnContragentDocNumber" msprop:Generator_ColumnPropNameInTable="ContragentDocNumberColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:Generator_ColumnPropNameInRow="Note" msprop:Generator_ColumnVarNameInTable="columnNote" msprop:Generator_ColumnPropNameInTable="NoteColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:Generator_ColumnPropNameInRow="MW" msprop:Generator_ColumnVarNameInTable="columnMW" msprop:Generator_ColumnPropNameInTable="MWColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="ShiftInDownload" msprop:Generator_UserTableName="ShiftInDownload" msprop:Generator_RowDeletedName="ShiftInDownloadRowDeleted" msprop:Generator_RowChangedName="ShiftInDownloadRowChanged" msprop:Generator_RowClassName="ShiftInDownloadRow" msprop:Generator_RowChangingName="ShiftInDownloadRowChanging" msprop:Generator_RowEvArgName="ShiftInDownloadRowChangeEvent" msprop:Generator_RowEvHandlerName="ShiftInDownloadRowChangeEventHandler" msprop:Generator_TableClassName="ShiftInDownloadDataTable" msprop:Generator_TableVarName="tableShiftInDownload" msprop:Generator_RowDeletingName="ShiftInDownloadRowDeleting" msprop:Generator_TablePropName="ShiftInDownload">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="DocDate" msprop:Generator_UserColumnName="DocDate" msprop:Generator_ColumnPropNameInRow="DocDate" msprop:Generator_ColumnVarNameInTable="columnDocDate" msprop:Generator_ColumnPropNameInTable="DocDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="DocNumber" msprop:Generator_UserColumnName="DocNumber" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="DocNumber" msprop:Generator_ColumnPropNameInTable="DocNumberColumn" msprop:Generator_ColumnVarNameInTable="columnDocNumber" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ContragentId" msprop:Generator_UserColumnName="ContragentId" msprop:Generator_ColumnPropNameInRow="ContragentId" msprop:Generator_ColumnVarNameInTable="columnContragentId" msprop:Generator_ColumnPropNameInTable="ContragentIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="ContragentDocDate" msprop:Generator_UserColumnName="ContragentDocDate" msprop:Generator_ColumnPropNameInRow="ContragentDocDate" msprop:Generator_ColumnVarNameInTable="columnContragentDocDate" msprop:Generator_ColumnPropNameInTable="ContragentDocDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="ContragentDocNumber" msprop:Generator_UserColumnName="ContragentDocNumber" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="ContragentDocNumber" msprop:Generator_ColumnPropNameInTable="ContragentDocNumberColumn" msprop:Generator_ColumnVarNameInTable="columnContragentDocNumber" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ParentId" msprop:Generator_UserColumnName="ParentId" msprop:Generator_ColumnPropNameInRow="ParentId" msprop:Generator_ColumnVarNameInTable="columnParentId" msprop:Generator_ColumnPropNameInTable="ParentIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="Note" msprop:Generator_ColumnPropNameInTable="NoteColumn" msprop:Generator_ColumnVarNameInTable="columnNote" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:Generator_ColumnPropNameInRow="MW" msprop:Generator_ColumnVarNameInTable="columnMW" msprop:Generator_ColumnPropNameInTable="MWColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="ShiftInLinesDownload" msprop:Generator_UserTableName="ShiftInLinesDownload" msprop:Generator_RowDeletedName="ShiftInLinesDownloadRowDeleted" msprop:Generator_RowChangedName="ShiftInLinesDownloadRowChanged" msprop:Generator_RowClassName="ShiftInLinesDownloadRow" msprop:Generator_RowChangingName="ShiftInLinesDownloadRowChanging" msprop:Generator_RowEvArgName="ShiftInLinesDownloadRowChangeEvent" msprop:Generator_RowEvHandlerName="ShiftInLinesDownloadRowChangeEventHandler" msprop:Generator_TableClassName="ShiftInLinesDownloadDataTable" msprop:Generator_TableVarName="tableShiftInLinesDownload" msprop:Generator_RowDeletingName="ShiftInLinesDownloadRowDeleting" msprop:Generator_TablePropName="ShiftInLinesDownload">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="DocId" msprop:Generator_UserColumnName="DocId" msprop:Generator_ColumnPropNameInRow="DocId" msprop:Generator_ColumnVarNameInTable="columnDocId" msprop:Generator_ColumnPropNameInTable="DocIdColumn" type="xs:int" />
              <xs:element name="GoodsId" msprop:Generator_UserColumnName="GoodsId" msprop:Generator_ColumnPropNameInRow="GoodsId" msprop:Generator_ColumnVarNameInTable="columnGoodsId" msprop:Generator_ColumnPropNameInTable="GoodsIdColumn" type="xs:int" />
              <xs:element name="BarCode" msprop:Generator_UserColumnName="BarCode" msprop:Generator_ColumnPropNameInRow="BarCode" msprop:Generator_ColumnVarNameInTable="columnBarCode" msprop:Generator_ColumnPropNameInTable="BarCodeColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="12" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="DocQntty" msprop:Generator_UserColumnName="DocQntty" msprop:Generator_ColumnPropNameInRow="DocQntty" msprop:Generator_ColumnVarNameInTable="columnDocQntty" msprop:Generator_ColumnPropNameInTable="DocQnttyColumn" type="xs:int" />
              <xs:element name="Qntty" msprop:Generator_UserColumnName="Qntty" msprop:Generator_ColumnPropNameInRow="Qntty" msprop:Generator_ColumnVarNameInTable="columnQntty" msprop:Generator_ColumnPropNameInTable="QnttyColumn" type="xs:int" />
              <xs:element name="SupplierGoodsId" msprop:Generator_UserColumnName="SupplierGoodsId" msprop:Generator_ColumnPropNameInRow="SupplierGoodsId" msprop:Generator_ColumnVarNameInTable="columnSupplierGoodsId" msprop:Generator_ColumnPropNameInTable="SupplierGoodsIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="ManufacturerPrice" msprop:Generator_UserColumnName="ManufacturerPrice" msprop:Generator_ColumnPropNameInRow="ManufacturerPrice" msprop:Generator_ColumnVarNameInTable="columnManufacturerPrice" msprop:Generator_ColumnPropNameInTable="ManufacturerPriceColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="SupplierPrice" msprop:Generator_UserColumnName="SupplierPrice" msprop:Generator_ColumnPropNameInRow="SupplierPrice" msprop:Generator_ColumnVarNameInTable="columnSupplierPrice" msprop:Generator_ColumnPropNameInTable="SupplierPriceColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="SupplierSumNOTAX" msprop:Generator_UserColumnName="SupplierSumNOTAX" msprop:Generator_ColumnPropNameInRow="SupplierSumNOTAX" msprop:Generator_ColumnVarNameInTable="columnSupplierSumNOTAX" msprop:Generator_ColumnPropNameInTable="SupplierSumNOTAXColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="ImportMarkup" msprop:Generator_UserColumnName="ImportMarkup" msprop:Generator_ColumnPropNameInRow="ImportMarkup" msprop:Generator_ColumnVarNameInTable="columnImportMarkup" msprop:Generator_ColumnPropNameInTable="ImportMarkupColumn" type="xs:double" minOccurs="0" />
              <xs:element name="SupplierMarkup" msprop:Generator_UserColumnName="SupplierMarkup" msprop:Generator_ColumnPropNameInRow="SupplierMarkup" msprop:Generator_ColumnVarNameInTable="columnSupplierMarkup" msprop:Generator_ColumnPropNameInTable="SupplierMarkupColumn" type="xs:double" minOccurs="0" />
              <xs:element name="BatchNumber" msprop:Generator_UserColumnName="BatchNumber" msprop:Generator_ColumnPropNameInRow="BatchNumber" msprop:Generator_ColumnVarNameInTable="columnBatchNumber" msprop:Generator_ColumnPropNameInTable="BatchNumberColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ReadyBefore" msprop:Generator_UserColumnName="ReadyBefore" msprop:Generator_ColumnPropNameInRow="ReadyBefore" msprop:Generator_ColumnVarNameInTable="columnReadyBefore" msprop:Generator_ColumnPropNameInTable="ReadyBeforeColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="MadeDate" msprop:Generator_UserColumnName="MadeDate" msprop:Generator_ColumnPropNameInRow="MadeDate" msprop:Generator_ColumnVarNameInTable="columnMadeDate" msprop:Generator_ColumnPropNameInTable="MadeDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="NDSTax" msprop:Generator_UserColumnName="NDSTax" msprop:Generator_ColumnPropNameInRow="NDSTax" msprop:Generator_ColumnVarNameInTable="columnNDSTax" msprop:Generator_ColumnPropNameInTable="NDSTaxColumn" type="xs:unsignedByte" minOccurs="0" />
              <xs:element name="NDSValue" msprop:Generator_UserColumnName="NDSValue" msprop:Generator_ColumnPropNameInRow="NDSValue" msprop:Generator_ColumnVarNameInTable="columnNDSValue" msprop:Generator_ColumnPropNameInTable="NDSValueColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="ReestrPrice" msprop:Generator_UserColumnName="ReestrPrice" msprop:Generator_ColumnPropNameInRow="ReestrPrice" msprop:Generator_ColumnVarNameInTable="columnReestrPrice" msprop:Generator_ColumnPropNameInTable="ReestrPriceColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="ReestrDate" msprop:Generator_UserColumnName="ReestrDate" msprop:Generator_ColumnPropNameInRow="ReestrDate" msprop:Generator_ColumnVarNameInTable="columnReestrDate" msprop:Generator_ColumnPropNameInTable="ReestrDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="GTDNumber" msprop:Generator_UserColumnName="GTDNumber" msprop:Generator_ColumnPropNameInRow="GTDNumber" msprop:Generator_ColumnVarNameInTable="columnGTDNumber" msprop:Generator_ColumnPropNameInTable="GTDNumberColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="30" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="CertificateNumber" msprop:Generator_UserColumnName="CertificateNumber" msprop:Generator_ColumnPropNameInRow="CertificateNumber" msprop:Generator_ColumnVarNameInTable="columnCertificateNumber" msprop:Generator_ColumnPropNameInTable="CertificateNumberColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="80" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="CertificateDate" msprop:Generator_UserColumnName="CertificateDate" msprop:Generator_ColumnPropNameInRow="CertificateDate" msprop:Generator_ColumnVarNameInTable="columnCertificateDate" msprop:Generator_ColumnPropNameInTable="CertificateDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="CertificateOrgId" msprop:Generator_UserColumnName="CertificateOrgId" msprop:Generator_ColumnPropNameInRow="CertificateOrgId" msprop:Generator_ColumnVarNameInTable="columnCertificateOrgId" msprop:Generator_ColumnPropNameInTable="CertificateOrgIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="RetailMarkup" msprop:Generator_UserColumnName="RetailMarkup" msprop:Generator_ColumnPropNameInRow="RetailMarkup" msprop:Generator_ColumnVarNameInTable="columnRetailMarkup" msprop:Generator_ColumnPropNameInTable="RetailMarkupColumn" type="xs:double" minOccurs="0" />
              <xs:element name="RetailPrice" msprop:Generator_UserColumnName="RetailPrice" msprop:Generator_ColumnPropNameInRow="RetailPrice" msprop:Generator_ColumnVarNameInTable="columnRetailPrice" msprop:Generator_ColumnPropNameInTable="RetailPriceColumn" type="xs:decimal" />
              <xs:element name="ContragentId" msprop:Generator_UserColumnName="ContragentId" msprop:Generator_ColumnPropNameInRow="ContragentId" msprop:Generator_ColumnVarNameInTable="columnContragentId" msprop:Generator_ColumnPropNameInTable="ContragentIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="ContragentDocDate" msprop:Generator_UserColumnName="ContragentDocDate" msprop:Generator_ColumnPropNameInRow="ContragentDocDate" msprop:Generator_ColumnVarNameInTable="columnContragentDocDate" msprop:Generator_ColumnPropNameInTable="ContragentDocDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="ContragentDocNumber" msprop:Generator_UserColumnName="ContragentDocNumber" msprop:Generator_ColumnPropNameInRow="ContragentDocNumber" msprop:Generator_ColumnVarNameInTable="columnContragentDocNumber" msprop:Generator_ColumnPropNameInTable="ContragentDocNumberColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ReturnLineId" msprop:Generator_UserColumnName="ReturnLineId" msprop:Generator_ColumnPropNameInRow="ReturnLineId" msprop:Generator_ColumnVarNameInTable="columnReturnLineId" msprop:Generator_ColumnPropNameInTable="ReturnLineIdColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="12" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:Generator_ColumnPropNameInRow="Note" msprop:Generator_ColumnVarNameInTable="columnNote" msprop:Generator_ColumnPropNameInTable="NoteColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:Generator_ColumnPropNameInRow="MW" msprop:Generator_ColumnVarNameInTable="columnMW" msprop:Generator_ColumnPropNameInTable="MWColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="ShiftInLines" msprop:Generator_UserTableName="ShiftInLines" msprop:Generator_RowDeletedName="ShiftInLinesRowDeleted" msprop:Generator_RowChangedName="ShiftInLinesRowChanged" msprop:Generator_RowClassName="ShiftInLinesRow" msprop:Generator_RowChangingName="ShiftInLinesRowChanging" msprop:Generator_RowEvArgName="ShiftInLinesRowChangeEvent" msprop:Generator_RowEvHandlerName="ShiftInLinesRowChangeEventHandler" msprop:Generator_TableClassName="ShiftInLinesDataTable" msprop:Generator_TableVarName="tableShiftInLines" msprop:Generator_RowDeletingName="ShiftInLinesRowDeleting" msprop:Generator_TablePropName="ShiftInLines">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="ReturnLineId" msprop:Generator_UserColumnName="ReturnLineId" msprop:Generator_ColumnPropNameInRow="ReturnLineId" msprop:Generator_ColumnVarNameInTable="columnReturnLineId" msprop:Generator_ColumnPropNameInTable="ReturnLineIdColumn" type="xs:int" />
              <xs:element name="DocId" msprop:Generator_UserColumnName="DocId" msprop:Generator_ColumnPropNameInRow="DocId" msprop:Generator_ColumnVarNameInTable="columnDocId" msprop:Generator_ColumnPropNameInTable="DocIdColumn" type="xs:int" />
              <xs:element name="GoodsId" msprop:Generator_UserColumnName="GoodsId" msprop:Generator_ColumnVarNameInTable="columnGoodsId" msprop:Generator_ColumnPropNameInRow="GoodsId" msprop:Generator_ColumnPropNameInTable="GoodsIdColumn" type="xs:int" />
              <xs:element name="SupplierGoodsId" msprop:Generator_UserColumnName="SupplierGoodsId" msprop:Generator_ColumnPropNameInRow="SupplierGoodsId" msprop:Generator_ColumnVarNameInTable="columnSupplierGoodsId" msprop:Generator_ColumnPropNameInTable="SupplierGoodsIdColumn" type="xs:int" />
              <xs:element name="PartyId" msprop:Generator_UserColumnName="PartyId" msprop:Generator_ColumnPropNameInRow="PartyId" msprop:Generator_ColumnVarNameInTable="columnPartyId" msprop:Generator_ColumnPropNameInTable="PartyIdColumn" type="xs:int" />
              <xs:element name="Name" msdata:ReadOnly="true" msprop:Generator_UserColumnName="Name" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInTable="NameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="213" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ManufacturerId" msprop:Generator_UserColumnName="ManufacturerId" msprop:Generator_ColumnPropNameInRow="ManufacturerId" msprop:Generator_ColumnVarNameInTable="columnManufacturerId" msprop:Generator_ColumnPropNameInTable="ManufacturerIdColumn" type="xs:int" />
              <xs:element name="ManufacturerName" msprop:Generator_UserColumnName="ManufacturerName" msprop:Generator_ColumnPropNameInRow="ManufacturerName" msprop:Generator_ColumnVarNameInTable="columnManufacturerName" msprop:Generator_ColumnPropNameInTable="ManufacturerNameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="BarCode" msprop:Generator_UserColumnName="BarCode" msprop:Generator_ColumnPropNameInRow="BarCode" msprop:Generator_ColumnVarNameInTable="columnBarCode" msprop:Generator_ColumnPropNameInTable="BarCodeColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="12" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ManufacturerPrice" msprop:Generator_UserColumnName="ManufacturerPrice" msprop:Generator_ColumnPropNameInRow="ManufacturerPrice" msprop:Generator_ColumnVarNameInTable="columnManufacturerPrice" msprop:Generator_ColumnPropNameInTable="ManufacturerPriceColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="SupplierPrice" msprop:Generator_UserColumnName="SupplierPrice" msprop:Generator_ColumnPropNameInRow="SupplierPrice" msprop:Generator_ColumnVarNameInTable="columnSupplierPrice" msprop:Generator_ColumnPropNameInTable="SupplierPriceColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="SupplierSumNOTAX" msprop:Generator_UserColumnName="SupplierSumNOTAX" msprop:Generator_ColumnVarNameInTable="columnSupplierSumNOTAX" msprop:Generator_ColumnPropNameInRow="SupplierSumNOTAX" msprop:Generator_ColumnPropNameInTable="SupplierSumNOTAXColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="ImportMarkup" msprop:Generator_UserColumnName="ImportMarkup" msprop:Generator_ColumnPropNameInRow="ImportMarkup" msprop:Generator_ColumnVarNameInTable="columnImportMarkup" msprop:Generator_ColumnPropNameInTable="ImportMarkupColumn" type="xs:double" minOccurs="0" />
              <xs:element name="SupplierMarkup" msprop:Generator_UserColumnName="SupplierMarkup" msprop:Generator_ColumnPropNameInRow="SupplierMarkup" msprop:Generator_ColumnVarNameInTable="columnSupplierMarkup" msprop:Generator_ColumnPropNameInTable="SupplierMarkupColumn" type="xs:double" minOccurs="0" />
              <xs:element name="BatchNumber" msprop:Generator_UserColumnName="BatchNumber" msprop:Generator_ColumnPropNameInRow="BatchNumber" msprop:Generator_ColumnVarNameInTable="columnBatchNumber" msprop:Generator_ColumnPropNameInTable="BatchNumberColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ReadyBefore" msprop:Generator_UserColumnName="ReadyBefore" msprop:Generator_ColumnPropNameInRow="ReadyBefore" msprop:Generator_ColumnVarNameInTable="columnReadyBefore" msprop:Generator_ColumnPropNameInTable="ReadyBeforeColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="MadeDate" msprop:Generator_UserColumnName="MadeDate" msprop:Generator_ColumnPropNameInRow="MadeDate" msprop:Generator_ColumnVarNameInTable="columnMadeDate" msprop:Generator_ColumnPropNameInTable="MadeDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="NDSTax" msprop:Generator_UserColumnName="NDSTax" msprop:Generator_ColumnPropNameInRow="NDSTax" msprop:Generator_ColumnVarNameInTable="columnNDSTax" msprop:Generator_ColumnPropNameInTable="NDSTaxColumn" type="xs:unsignedByte" minOccurs="0" />
              <xs:element name="NDSValue" msprop:Generator_UserColumnName="NDSValue" msprop:Generator_ColumnPropNameInRow="NDSValue" msprop:Generator_ColumnVarNameInTable="columnNDSValue" msprop:Generator_ColumnPropNameInTable="NDSValueColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="ReestrPrice" msprop:Generator_UserColumnName="ReestrPrice" msprop:Generator_ColumnPropNameInRow="ReestrPrice" msprop:Generator_ColumnVarNameInTable="columnReestrPrice" msprop:Generator_ColumnPropNameInTable="ReestrPriceColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="ReestrDate" msprop:Generator_UserColumnName="ReestrDate" msprop:Generator_ColumnPropNameInRow="ReestrDate" msprop:Generator_ColumnVarNameInTable="columnReestrDate" msprop:Generator_ColumnPropNameInTable="ReestrDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="GTDNumber" msprop:Generator_UserColumnName="GTDNumber" msprop:Generator_ColumnPropNameInRow="GTDNumber" msprop:Generator_ColumnVarNameInTable="columnGTDNumber" msprop:Generator_ColumnPropNameInTable="GTDNumberColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="30" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="CertificateNumber" msprop:Generator_UserColumnName="CertificateNumber" msprop:Generator_ColumnPropNameInRow="CertificateNumber" msprop:Generator_ColumnVarNameInTable="columnCertificateNumber" msprop:Generator_ColumnPropNameInTable="CertificateNumberColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="80" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="CertificateDate" msprop:Generator_UserColumnName="CertificateDate" msprop:Generator_ColumnPropNameInRow="CertificateDate" msprop:Generator_ColumnVarNameInTable="columnCertificateDate" msprop:Generator_ColumnPropNameInTable="CertificateDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="CertificateOrgId" msprop:Generator_UserColumnName="CertificateOrgId" msprop:Generator_ColumnPropNameInRow="CertificateOrgId" msprop:Generator_ColumnVarNameInTable="columnCertificateOrgId" msprop:Generator_ColumnPropNameInTable="CertificateOrgIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="RetailMarkup" msprop:Generator_UserColumnName="RetailMarkup" msprop:Generator_ColumnPropNameInRow="RetailMarkup" msprop:Generator_ColumnVarNameInTable="columnRetailMarkup" msprop:Generator_ColumnPropNameInTable="RetailMarkupColumn" type="xs:double" minOccurs="0" />
              <xs:element name="ContragentId" msprop:Generator_UserColumnName="ContragentId" msprop:Generator_ColumnPropNameInRow="ContragentId" msprop:Generator_ColumnVarNameInTable="columnContragentId" msprop:Generator_ColumnPropNameInTable="ContragentIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="ContragentDocDate" msprop:Generator_UserColumnName="ContragentDocDate" msprop:Generator_ColumnPropNameInRow="ContragentDocDate" msprop:Generator_ColumnVarNameInTable="columnContragentDocDate" msprop:Generator_ColumnPropNameInTable="ContragentDocDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="ContragentDocNumber" msprop:Generator_UserColumnName="ContragentDocNumber" msprop:Generator_ColumnPropNameInRow="ContragentDocNumber" msprop:Generator_ColumnVarNameInTable="columnContragentDocNumber" msprop:Generator_ColumnPropNameInTable="ContragentDocNumberColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Blocked" msprop:Generator_UserColumnName="Blocked" msprop:Generator_ColumnVarNameInTable="columnBlocked" msprop:Generator_ColumnPropNameInRow="Blocked" msprop:Generator_ColumnPropNameInTable="BlockedColumn" type="xs:boolean" default="true" />
              <xs:element name="RetailPrice" msprop:Generator_UserColumnName="RetailPrice" msprop:Generator_ColumnPropNameInRow="RetailPrice" msprop:Generator_ColumnVarNameInTable="columnRetailPrice" msprop:Generator_ColumnPropNameInTable="RetailPriceColumn" type="xs:decimal" />
              <xs:element name="DocQntty" msprop:Generator_UserColumnName="DocQntty" msprop:Generator_ColumnPropNameInRow="DocQntty" msprop:Generator_ColumnVarNameInTable="columnDocQntty" msprop:Generator_ColumnPropNameInTable="DocQnttyColumn" type="xs:int" />
              <xs:element name="Qntty" msprop:Generator_UserColumnName="Qntty" msprop:Generator_ColumnPropNameInRow="Qntty" msprop:Generator_ColumnVarNameInTable="columnQntty" msprop:Generator_ColumnPropNameInTable="QnttyColumn" type="xs:int" />
              <xs:element name="RetailSum" msprop:Generator_UserColumnName="RetailSum" msprop:Generator_ColumnPropNameInRow="RetailSum" msprop:Generator_ColumnVarNameInTable="columnRetailSum" msprop:Generator_ColumnPropNameInTable="RetailSumColumn" type="xs:decimal" />
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:Generator_ColumnPropNameInRow="Note" msprop:Generator_ColumnVarNameInTable="columnNote" msprop:Generator_ColumnPropNameInTable="NoteColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:Generator_ColumnPropNameInRow="MW" msprop:Generator_ColumnVarNameInTable="columnMW" msprop:Generator_ColumnPropNameInTable="MWColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="ShiftInParties" msprop:Generator_UserTableName="ShiftInParties" msprop:Generator_RowDeletedName="ShiftInPartiesRowDeleted" msprop:Generator_RowChangedName="ShiftInPartiesRowChanged" msprop:Generator_RowClassName="ShiftInPartiesRow" msprop:Generator_RowChangingName="ShiftInPartiesRowChanging" msprop:Generator_RowEvArgName="ShiftInPartiesRowChangeEvent" msprop:Generator_RowEvHandlerName="ShiftInPartiesRowChangeEventHandler" msprop:Generator_TableClassName="ShiftInPartiesDataTable" msprop:Generator_TableVarName="tableShiftInParties" msprop:Generator_RowDeletingName="ShiftInPartiesRowDeleting" msprop:Generator_TablePropName="ShiftInParties">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="DocId" msprop:Generator_UserColumnName="DocId" msprop:Generator_ColumnPropNameInRow="DocId" msprop:Generator_ColumnVarNameInTable="columnDocId" msprop:Generator_ColumnPropNameInTable="DocIdColumn" type="xs:int" />
              <xs:element name="GoodsId" msprop:Generator_UserColumnName="GoodsId" msprop:Generator_ColumnPropNameInRow="GoodsId" msprop:Generator_ColumnVarNameInTable="columnGoodsId" msprop:Generator_ColumnPropNameInTable="GoodsIdColumn" type="xs:int" />
              <xs:element name="RetailPrice" msprop:Generator_UserColumnName="RetailPrice" msprop:Generator_ColumnPropNameInRow="RetailPrice" msprop:Generator_ColumnVarNameInTable="columnRetailPrice" msprop:Generator_ColumnPropNameInTable="RetailPriceColumn" type="xs:decimal" />
              <xs:element name="BarCode" msprop:Generator_UserColumnName="BarCode" msprop:Generator_ColumnPropNameInRow="BarCode" msprop:Generator_ColumnVarNameInTable="columnBarCode" msprop:Generator_ColumnPropNameInTable="BarCodeColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="12" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="InputLineId" msprop:Generator_UserColumnName="InputLineId" msprop:Generator_ColumnPropNameInRow="InputLineId" msprop:Generator_ColumnVarNameInTable="columnInputLineId" msprop:Generator_ColumnPropNameInTable="InputLineIdColumn" type="xs:int" />
              <xs:element name="Blocked" msprop:Generator_UserColumnName="Blocked" msprop:Generator_ColumnPropNameInRow="Blocked" msprop:Generator_ColumnVarNameInTable="columnBlocked" msprop:Generator_ColumnPropNameInTable="BlockedColumn" type="xs:boolean" />
              <xs:element name="RestQntty" msprop:Generator_UserColumnName="RestQntty" msprop:Generator_ColumnPropNameInRow="RestQntty" msprop:Generator_ColumnVarNameInTable="columnRestQntty" msprop:Generator_ColumnPropNameInTable="RestQnttyColumn" type="xs:int" />
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:Generator_ColumnPropNameInRow="Note" msprop:Generator_ColumnVarNameInTable="columnNote" msprop:Generator_ColumnPropNameInTable="NoteColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:Generator_ColumnPropNameInRow="MW" msprop:Generator_ColumnVarNameInTable="columnMW" msprop:Generator_ColumnPropNameInTable="MWColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="ShiftOutByIncome" msprop:Generator_UserTableName="ShiftOutByIncome" msprop:Generator_RowDeletedName="ShiftOutByIncomeRowDeleted" msprop:Generator_RowChangedName="ShiftOutByIncomeRowChanged" msprop:Generator_RowClassName="ShiftOutByIncomeRow" msprop:Generator_RowChangingName="ShiftOutByIncomeRowChanging" msprop:Generator_RowEvArgName="ShiftOutByIncomeRowChangeEvent" msprop:Generator_RowEvHandlerName="ShiftOutByIncomeRowChangeEventHandler" msprop:Generator_TableClassName="ShiftOutByIncomeDataTable" msprop:Generator_TableVarName="tableShiftOutByIncome" msprop:Generator_RowDeletingName="ShiftOutByIncomeRowDeleting" msprop:Generator_TablePropName="ShiftOutByIncome">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="ContragentId" msprop:Generator_UserColumnName="ContragentId" msprop:Generator_ColumnVarNameInTable="columnContragentId" msprop:Generator_ColumnPropNameInRow="ContragentId" msprop:Generator_ColumnPropNameInTable="ContragentIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="ContragentName" msprop:Generator_UserColumnName="ContragentName" msprop:Generator_ColumnVarNameInTable="columnContragentName" msprop:Generator_ColumnPropNameInRow="ContragentName" msprop:Generator_ColumnPropNameInTable="ContragentNameColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="DocDate" msprop:Generator_UserColumnName="DocDate" msprop:Generator_ColumnVarNameInTable="columnDocDate" msprop:Generator_ColumnPropNameInRow="DocDate" msprop:Generator_ColumnPropNameInTable="DocDateColumn" type="xs:dateTime" />
              <xs:element name="DocNumber" msprop:Generator_UserColumnName="DocNumber" msprop:Generator_ColumnVarNameInTable="columnDocNumber" msprop:Generator_ColumnPropNameInRow="DocNumber" msprop:Generator_ColumnPropNameInTable="DocNumberColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Lines" msdata:ReadOnly="true" msprop:Generator_UserColumnName="Lines" msprop:Generator_ColumnVarNameInTable="columnLines" msprop:Generator_ColumnPropNameInRow="Lines" msprop:Generator_ColumnPropNameInTable="LinesColumn" type="xs:int" minOccurs="0" />
              <xs:element name="DocSum" msdata:ReadOnly="true" msprop:Generator_UserColumnName="DocSum" msprop:Generator_ColumnVarNameInTable="columnDocSum" msprop:Generator_ColumnPropNameInRow="DocSum" msprop:Generator_ColumnPropNameInTable="DocSumColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:Generator_ColumnVarNameInTable="columnNote" msprop:Generator_ColumnPropNameInRow="Note" msprop:Generator_ColumnPropNameInTable="NoteColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:Generator_ColumnVarNameInTable="columnMW" msprop:Generator_ColumnPropNameInRow="MW" msprop:Generator_ColumnPropNameInTable="MWColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="RID" msprop:Generator_UserColumnName="RID" msprop:Generator_ColumnVarNameInTable="columnRID" msprop:Generator_ColumnPropNameInRow="RID" msprop:Generator_ColumnPropNameInTable="RIDColumn" type="xs:int" minOccurs="0" />
              <xs:element name="ContragentDocNumber" msprop:Generator_UserColumnName="ContragentDocNumber" msprop:Generator_ColumnVarNameInTable="columnContragentDocNumber" msprop:Generator_ColumnPropNameInRow="ContragentDocNumber" msprop:Generator_ColumnPropNameInTable="ContragentDocNumberColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="ShiftOutLinesByIncome" msprop:Generator_UserTableName="ShiftOutLinesByIncome" msprop:Generator_RowDeletedName="ShiftOutLinesByIncomeRowDeleted" msprop:Generator_RowChangedName="ShiftOutLinesByIncomeRowChanged" msprop:Generator_RowClassName="ShiftOutLinesByIncomeRow" msprop:Generator_RowChangingName="ShiftOutLinesByIncomeRowChanging" msprop:Generator_RowEvArgName="ShiftOutLinesByIncomeRowChangeEvent" msprop:Generator_RowEvHandlerName="ShiftOutLinesByIncomeRowChangeEventHandler" msprop:Generator_TableClassName="ShiftOutLinesByIncomeDataTable" msprop:Generator_TableVarName="tableShiftOutLinesByIncome" msprop:Generator_RowDeletingName="ShiftOutLinesByIncomeRowDeleting" msprop:Generator_TablePropName="ShiftOutLinesByIncome">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="PartyId" msprop:Generator_UserColumnName="PartyId" msprop:Generator_ColumnPropNameInRow="PartyId" msprop:Generator_ColumnVarNameInTable="columnPartyId" msprop:Generator_ColumnPropNameInTable="PartyIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="Qntty" msprop:Generator_UserColumnName="Qntty" msprop:Generator_ColumnPropNameInRow="Qntty" msprop:Generator_ColumnVarNameInTable="columnQntty" msprop:Generator_ColumnPropNameInTable="QnttyColumn" type="xs:int" minOccurs="0" />
              <xs:element name="RetailSum" msprop:Generator_UserColumnName="RetailSum" msprop:Generator_ColumnPropNameInRow="RetailSum" msprop:Generator_ColumnVarNameInTable="columnRetailSum" msprop:Generator_ColumnPropNameInTable="RetailSumColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="RestQntty" msprop:Generator_UserColumnName="RestQntty" msprop:Generator_ColumnPropNameInRow="RestQntty" msprop:Generator_ColumnVarNameInTable="columnRestQntty" msprop:Generator_ColumnPropNameInTable="RestQnttyColumn" type="xs:int" minOccurs="0" />
              <xs:element name="RestSum" msprop:Generator_UserColumnName="RestSum" msprop:Generator_ColumnPropNameInRow="RestSum" msprop:Generator_ColumnVarNameInTable="columnRestSum" msprop:Generator_ColumnPropNameInTable="RestSumColumn" type="xs:decimal" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:ShiftsOut" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="ShiftOutLines_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:ShiftOutLines" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="ShiftsIn_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:ShiftsIn" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="ShiftsOutFree_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:ShiftsOutFree" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="Reprices_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:Reprices" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="Disgathers_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:Disgathers" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="WriteOffs_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:WriteOffs" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="WriteOffLines_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:WriteOffLines" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="ShiftOutUpload_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:ShiftOutUpload" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="ShiftInDownload_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:ShiftInDownload" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="ShiftInLines_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:ShiftInLines" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="ShiftInParties_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:ShiftInParties" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="ShiftOutByIncome_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:ShiftOutByIncome" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="ShiftOutLinesByIncome_Constraint1" msdata:ConstraintName="Constraint1">
      <xs:selector xpath=".//mstns:ShiftOutLinesByIncome" />
      <xs:field xpath="mstns:PartyId" />
    </xs:unique>
  </xs:element>
  <xs:annotation>
    <xs:appinfo>
      <msdata:Relationship name="ShiftInParties_ShiftInLines" msdata:parent="ShiftInParties" msdata:child="ShiftInLines" msdata:parentkey="Id" msdata:childkey="PartyId" msprop:Generator_UserRelationName="ShiftInParties_ShiftInLines" msprop:Generator_RelationVarName="relationShiftInParties_ShiftInLines" msprop:Generator_UserChildTable="ShiftInLines" msprop:Generator_UserParentTable="ShiftInParties" msprop:Generator_ParentPropName="ShiftInPartiesRow" msprop:Generator_ChildPropName="GetShiftInLinesRows" />
    </xs:appinfo>
  </xs:annotation>
</xs:schema>